electron-bytenode-webpack-plugin

1.1.2 • Public • Published

Bytenode Webpack Plugin

Inspired by 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 electron-bytenode-webpack-plugin
  yarn add --dev electron-bytenode-webpack-plugin

Usage

// webpack.config.js

const BytenodeWebpackPlugin = require('electron-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('electron-bytenode-webpack-plugin')

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


Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.2
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.2
    3
  • 1.1.1
    0
  • 1.1.0
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i electron-bytenode-webpack-plugin

Weekly Downloads

3

Version

1.1.2

License

ISC

Unpacked Size

5.23 kB

Total Files

3

Last publish

Collaborators

  • ytsteven