@dopry/bytenode-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

2.0.0-next.1 • Public • Published

@herberttn/bytenode-webpack-plugin

ci coveralls npm license

Compile JavaScript into bytecode using bytenode.
Inspired by bytenode-webpack-plugin.

Install

npm install --save @herberttn/bytenode-webpack-plugin

Supports

  • electron-forge
    • ✔️ Default configuration
  • webpack
    • ✔️ v5
    • ✔️ entry as a string (e.g., 'src/index.js')
    • ✔️ entry as an array (e.g., ['src/index.js'])
    • ✔️ entry as an object (e.g., { main: 'src/index.js' })
    • ✔️ entry middlewares (e.g., ['src/index.js', 'webpack-hot-middleware/client'])
    • ✔️ Dynamic output.filename (e.g., '[name].js')
    • ✔️ 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

herberttn
herberttn
jjeff
Jeff Robbins
dopry
Darrel O'Pry

Package Sidebar

Install

npm i @dopry/bytenode-webpack-plugin

Weekly Downloads

1

Version

2.0.0-next.1

License

MIT

Unpacked Size

18.9 kB

Total Files

12

Last publish

Collaborators

  • dopry