diff --git a/.babelrc b/.babelrc index 0fc7405..f78f321 100644 --- a/.babelrc +++ b/.babelrc @@ -6,5 +6,9 @@ } }], "es2015" + ], + "plugins": [ + "transform-runtime", + "transform-regenerator", ] } diff --git a/package.json b/package.json index 49613cb..d5d377e 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,8 @@ "autoprefixer": "^6.3.6", "babel-core": "^6.26.0", "babel-loader": "^7.1.2", + "babel-plugin-transform-regenerator": "^6.26.0", + "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.1", "babel-preset-es2015": "^6.24.1", "bootstrap": "^3.3.7", @@ -95,6 +97,7 @@ "postcss-sprites": "^4.2.0", "postcss-use": "^2.3.0", "precss": "^1.4.0", + "regenerator-runtime": "^0.11.1", "rewire": "^2.5.1", "shelljs": "^0.7.0", "style-loader": "^0.16.0", diff --git a/public/build/webpack.base.config.js b/public/build/webpack.base.config.js index 1e7690d..aa3c094 100644 --- a/public/build/webpack.base.config.js +++ b/public/build/webpack.base.config.js @@ -65,7 +65,8 @@ const getEntries = () => { 'yoho-jquery-lazyload', 'yoho-slider', 'yoho-jquery-pjax', - 'yoho-jquery-dotdotdot' + 'yoho-jquery-dotdotdot', + 'regenerator-runtime/runtime' ], base: path.join(__dirname, '../scss/base.css') };