Socket
Socket
Sign inDemoInstall

@arifali/bytenode-webpack-plugin

Package Overview
Dependencies
80
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @arifali/bytenode-webpack-plugin

Compile JavaScript into bytecode using bytenode


Version published
Maintainers
1
Created

Readme

Source

@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
    • :heavy_check_mark: Default configuration
  • webpack
    • :heavy_check_mark: v4
    • :grey_question: v5
    • :heavy_check_mark: entry as a string (e.g., 'src/index.js')
    • :heavy_check_mark: entry as an array (e.g., ['src/index.js'])
    • :heavy_check_mark: entry as an object (e.g., { main: 'src/index.js' })
    • :heavy_check_mark: entry middlewares (e.g., ['src/index.js', 'webpack-hot-middleware/client'])
    • :heavy_check_mark: Dynamic output.filename (e.g., '[name].js')
    • :heavy_check_mark: 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 {
  compileAsModule: boolean;    // wraps the code in a node module
  compileForElectron: boolean; // compiles for electron instead of plain node
  debugLifecycle: boolean;     // enables webpack hooks lifecycle logs
  debugLogs: boolean;          // enables debug logs
  keepSource: boolean;         // emits the original source files along with the compiled ones
  preventSourceMaps: boolean;  // prevents source maps from being generated
  silent: boolean;             // disables all logs, but not errors thrown (overrides debug flags)
}
Default options
new BytenodeWebpackPlugin({
  compileAsModule: true,
  compileForElectron: false,
  debugLifecycle: false,
  debugLogs: false,
  keepSource: false,
  preventSourceMaps: true,
  silent: false,
})

Contributors

herberttn
herberttn
jjeff
Jeff Robbins

Keywords

FAQs

Last updated on 14 Aug 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc