Socket
Socket
Sign inDemoInstall

@constgen/neutrino-optimization

Package Overview
Dependencies
301
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @constgen/neutrino-optimization

Neutrino middleware to configure optimization and minification for production builds


Version published
Maintainers
1
Install size
4.04 MB
Created

Readme

Source

@constgen/neutrino-optimization

npm npm

Neutrino middleware that automatically enables necessary source maps in development and production

Features

  • Human-readable chunk names
  • Vendor modules chunks
  • Dynamic imports chunks
  • Shared modules chunks
  • Max size chunks splitting
  • JS minification
  • CSS minification
  • Performance warnings on production only

Requirements

  • Node.js v10+
  • Neutrino v9
  • Webpack v4

Installation

@constgen/neutrino-optimization can be installed from NPM. You should install it to "dependencies" (--save) or "devDependncies" (--save-dev) depending on your goal.

npm install --save @constgen/neutrino-optimization

Usage

In preset

Require this package and plug it into Neutrino. The following shows how you can pass an options object to the middleware, showing the defaults:

let optimization = require('@constgen/neutrino-optimization')

neutrino.use(optimization({
   chunks  : true, // enable chunks optimization splitting
   minimize: true // enable code minification
}))

In neutrinorc

The middleware also may be used together with another presets in Neutrino rc-file, e.g.:

.neutrinorc.js

let optimization = require('@constgen/neutrino-optimization')

module.exports = {
   use: [
      optimization()
   ]
}

Keywords

FAQs

Last updated on 16 Mar 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