[webpack] use babel to ensure legacy browser compatibility (#645)

This commit is contained in:
Spencer
2018-03-15 14:53:43 -07:00
committed by GitHub
parent f28bbfc349
commit 4be86b402b
5 changed files with 41 additions and 18 deletions

View File

@ -1,5 +1,5 @@
const DefinePlugin = require('webpack/lib/DefinePlugin')
const { ignoreLoader, rel } = require('./lib')
const webpack = require('webpack')
const { jsLoader, ignoreLoader, rel } = require('./lib')
module.exports = {
context: rel('src'),
@ -9,7 +9,8 @@ module.exports = {
path: rel('dist'),
},
module: {
loaders: [
rules: [
jsLoader(),
ignoreLoader([
'src/lib/connectors/jquery.js',
'src/lib/connectors/xhr.js',
@ -18,7 +19,7 @@ module.exports = {
],
},
plugins: [
new DefinePlugin({
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"production"',
}),
],