Authored by yyq

babel

@@ -62,6 +62,10 @@ @@ -62,6 +62,10 @@
62 }, 62 },
63 "devDependencies": { 63 "devDependencies": {
64 "autoprefixer": "^6.3.6", 64 "autoprefixer": "^6.3.6",
  65 + "babel-core": "^6.26.0",
  66 + "babel-loader": "^7.1.2",
  67 + "babel-preset-env": "^1.6.1",
  68 + "babel-preset-es2015": "^6.24.1",
65 "bootstrap": "^3.3.7", 69 "bootstrap": "^3.3.7",
66 "css-loader": "^0.27.3", 70 "css-loader": "^0.27.3",
67 "cssnano": "^3.10.0", 71 "cssnano": "^3.10.0",
@@ -117,6 +117,12 @@ module.exports = (env) => { @@ -117,6 +117,12 @@ module.exports = (env) => {
117 } 117 }
118 }] 118 }]
119 }, { 119 }, {
  120 + test: /\.js$/,
  121 + exclude: [/node_modules/],
  122 + use: [{
  123 + loader: 'happypack/loader?id=js'
  124 + }]
  125 + }, {
120 test: /\.css$/, 126 test: /\.css$/,
121 use: cssLoader(env, 'css') 127 use: cssLoader(env, 'css')
122 }, { 128 }, {
@@ -145,6 +151,11 @@ module.exports = (env) => { @@ -145,6 +151,11 @@ module.exports = (env) => {
145 }, 151 },
146 plugins: [ 152 plugins: [
147 new HappyPack({ 153 new HappyPack({
  154 + id: 'js',
  155 + threadPool: happyThreadPool,
  156 + loaders: ['babel-loader'],
  157 + }),
  158 + new HappyPack({
148 id: 'hbs', 159 id: 'hbs',
149 threadPool: happyThreadPool, 160 threadPool: happyThreadPool,
150 loaders: [hbsLoader] 161 loaders: [hbsLoader]