1.0.5 • Published 4 years ago

bytenode-webpack-plugin v1.0.5

Weekly downloads
99
License
ISC
Repository
gitlab
Last release
4 years ago

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

NameTypeDefaultDescription
compileAsModulebooleantrueAllow the resulting .jsc file to be used as a module or not.
keepSourcebooleanfalseKeep 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
    })
  ]
}

1.0.5

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago