@dopry/bytenode-webpack-plugin
v2.0.0-next.1
Published
Compile JavaScript into bytecode using bytenode
Downloads
3
Maintainers
Readme
@herberttn/bytenode-webpack-plugin
Compile JavaScript into bytecode using bytenode
.
Inspired by bytenode-webpack-plugin
.
Install
npm install --save @herberttn/bytenode-webpack-plugin
Supports
electron-forge
- :heavy_check_mark: Default configuration
webpack
- :heavy_check_mark: v5
- :heavy_check_mark:
entry
as astring
(e.g.,'src/index.js'
) - :heavy_check_mark:
entry
as anarray
(e.g.,['src/index.js']
) - :heavy_check_mark:
entry
as anobject
(e.g.,{ main: 'src/index.js' }
) - :heavy_check_mark:
entry
middlewares (e.g.,['src/index.js', 'webpack-hot-middleware/client']
) - :heavy_check_mark: Dynamic
output.filename
(e.g.,'[name].js'
) - :heavy_check_mark: Named
output.filename
(e.g.,'index.js'
)
Usage
import { BytenodeWebpackPlugin } from '@herberttn/bytenode-webpack-plugin';
// webpack options
module.exports = {
// ...
plugins: [
// using all defaults
new BytenodeWebpackPlugin(),
// overriding an option
new BytenodeWebpackPlugin({
compileForElectron: true,
}),
],
};
Options
interface Options {
compileForElectron: boolean; // compiles for electron instead of plain node
}
Default options
new BytenodeWebpackPlugin({
compileForElectron: false,
})