module.exports = { entry: './index.js', output: { filename: 'index.min.js', path: './' }, module: { loaders: [ { test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: { presets: ['es2015'], plugins: ['transform-runtime'] }, cacheDirectory: true } ] } }
const pi = 3.14159265; let s = "Hello"; for (let codePoint of s) { console.log(codePoint); }
When I delete the line of "exclude", the compiled file becomes about twice greater and it throw error: "$extend is not a function".
I wonder why the exclude option have effects on the compiling process. I only compile ./index.js