★ wanayoo — archive 1999 https://github.com/WezomAgency/babel-loader-exclude-node-modules-exceptNouvelle recherche | Portail wanayoo
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

babel-loader-exclude-node-modules-except

license npm npm npm

Creating a regular expression for excluding node_modules
from babel transpiling except for individual modules

Usage

// webpack.config.js

const babelLoaderExcludeNodeModulesExcept = require('babel-loader-exclude-node-modules-except');

module.exports = {
  // config properties
  // ...
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: babelLoaderExcludeNodeModulesExcept([
          // es6 modules from node_modules/
          'custom-jquery-methods',
          'swiper',
          'dom7'
        ]),
        use: {
          loader: 'babel-loader'
        }
      }
    ]
  }
};

Contributors 💪


License

MIT License


About

Creating a regular expression for excluding node modules from transpiling except for individual modules

Topics

Resources

License

Packages

No packages published
You can’t perform that action at this time.