bytenode-webpack-plugin

1.0.5 • Public • Published

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

// webpack.config.js
 
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
compileAsModule boolean true Allow the resulting .jsc file to be used as a module or not.
keepSource boolean false Keep JS source files in output or not.

To use options:

// webpack.config.js
 
const BytenodeWebpackPlugin = require('bytenode-webpack-plugin')
 
module.exports = {
  entry: 'index.js',
  output: {
    path: __dirname + '/dist',
    filename: 'index_bundle.js'
  },
  plugins: [
    new BytenodeWebpackPlugin({
        compileAsModule: false,
        keepSource: true
    })
  ]
}


Package Sidebar

Install

npm i bytenode-webpack-plugin

Weekly Downloads

61

Version

1.0.5

License

ISC

Unpacked Size

3.58 kB

Total Files

3

Last publish

Collaborators

  • arhmjn
  • jairajdev
  • kgmyatthu
  • thantsintoe
  • linearscaleaf
  • asyed94