webpack-ignore-dynamic-require

1.0.0 • Public • Published

Webpack / Ignore dynamic require

When you are using webpack for a backend project, some projects try to use require calls with variable, e.g. to load configuration files. Webpack is usually confused by this, so this plugin will simply ignore them, and let the call as-is.

Usage

The plugin takes no options. Simply require it and invoke like any other plugin.

// webpack.config.js
const IgnoreDynamicRequire = require('webpack-ignore-dynamic-require');

module.exports = {
  // ...
  plugins: [
    new IgnoreDynamicRequire()
  ]
}

Readme

Keywords

Package Sidebar

Install

npm i webpack-ignore-dynamic-require

Weekly Downloads

3,815

Version

1.0.0

License

MIT

Unpacked Size

2.8 kB

Total Files

5

Last publish

Collaborators

  • glandos