2.0.0-next.1 • Published 3 years ago
@dopry/bytenode-webpack-plugin v2.0.0-next.1
@herberttn/bytenode-webpack-plugin
Compile JavaScript into bytecode using bytenode.
Inspired by bytenode-webpack-plugin.
Install
npm install --save @herberttn/bytenode-webpack-pluginSupports
electron-forge- :heavy_check_mark: Default configuration
webpack- :heavy_check_mark: v5
- :heavy_check_mark:
entryas astring(e.g.,'src/index.js') - :heavy_check_mark:
entryas anarray(e.g.,['src/index.js']) - :heavy_check_mark:
entryas anobject(e.g.,{ main: 'src/index.js' }) - :heavy_check_mark:
entrymiddlewares (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,
})Contributors
2.0.0-next.1
3 years ago