rollup-plugin-worker-inline
v1.0.7
Published
rollup-plugin-worker-inline
Downloads
36
Readme
rollup-plugin-worker-inline
A simple rollup plugin to create inline worker
Temporarily does not support packaging of importScripts
, import
and require
modules.
Install
$ npm install rollup-plugin-worker-inline
Usage
In the rollup.config.js
, or you can test the sample file ./sample/rollup.config.js
import workerInline from 'rollup-plugin-worker-inline';
export default {
// ...
plugins: [
workerInline({
// The worker file passes `@babel/preset-env` and `babel-preset-minify` presets processing by default.
// Or you can customize the worker output yourself.
transform: code => code,
}),
],
// ...
};
License
MIT © Harvey Zack