webpack-node-modules

0.1.1 • Public • Published

webpack-node-modules

NPM version NPM downloads CircleCI donate

Include node modules which meet one of following requirements in webpack loader:

  • has module field
  • engines.node > 0.10

Install

yarn add webpack-node-modules --dev

Usage

// webpack.config.js
const path = require('path')
const nodeModules = require('webpack-node-modules')
 
module.exports = {
  module: {
    rules: [{
      test: /\.js$/,
      loader: 'babel-loader',
      include: [
        // Your app
        path.join(__dirname, 'src'),
        // Modules with `module` field or `engines.node > 0.10`
        nodeModules()
      ]
    }]
  }
}

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

webpack-node-modules © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).

egoistian.com · GitHub @egoist · Twitter @rem_rin_rin

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-node-modules

Weekly Downloads

15

Version

0.1.1

License

MIT

Last publish

Collaborators

  • rem