Bytenode Webpack Plugin
A webpack plugin that simplifies compiling your JS
source code into V8 bytecode using Bytenode.
Essentially converts raw .js
files in your output into compiled .jsc
files.
Install
npm install --save-dev bytenode-webpack-plugin
yarn add --dev bytenode-webpack-plugin
Usage
const BytenodeWebpackPlugin = require('bytenode-webpack-plugin')
module.exports = {
entry: 'index.js',
output: {
path: __dirname + '/dist',
filename: 'index_bundle.js'
},
plugins: [
new BytenodeWebpackPlugin()
]
}
Options
Name | Type | Default | Description |
---|
keepSource | boolean | false | Keep JS source files in output or not. |
Here's an example that shows how to output both .js
and .jsc
files:
const BytenodeWebpackPlugin = require('bytenode-webpack-plugin')
module.exports = {
entry: 'index.js',
output: {
path: __dirname + '/dist',
filename: 'index_bundle.js'
},
plugins: [
new BytenodeWebpackPlugin({
keepSource: true
})
]
}
Shardus