0.1.1 • Published 7 years ago

webpack-node-modules v0.1.1

Weekly downloads
736
License
MIT
Repository
github
Last release
7 years ago

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

0.1.1

7 years ago

0.1.0

7 years ago