Skip to content

egoist/webpack-node-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Include specified node_modules in webpack loader

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published