From 6da043f2a9731765c6695793af9634db958140f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=9E=97=E6=BE=8E?= Date: Tue, 15 Jan 2019 21:57:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DIE11=E4=B8=8B=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=AD=A3=E5=B8=B8=E4=BD=BF=E7=94=A8=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/webpack.base.conf.js | 2 +- build/webpack.dev.conf.js | 6 +++--- build/webpack.prod.conf.js | 4 ++-- package.json | 7 ++++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index 3b946b4b..2d8ec5b8 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -23,7 +23,7 @@ const createLintingRule = () => ({ module.exports = { context: path.resolve(__dirname, '../'), entry: { - app: './src/main.js' + app: ['babel-polyfill', './src/main.js'] }, output: { path: config.build.assetsRoot, diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js index 26a5584a..b3b95bee 100644 --- a/build/webpack.dev.conf.js +++ b/build/webpack.dev.conf.js @@ -59,9 +59,9 @@ const devWebpackConfig = merge(baseWebpackConfig, { favicon: resolve('favicon.ico'), title: 'vue-element-admin', templateParameters: { - BASE_URL: config.dev.assetsPublicPath + config.dev.assetsSubDirectory, - }, - }), + BASE_URL: config.dev.assetsPublicPath + config.dev.assetsSubDirectory + } + }) ] }) diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js index 4f84e0c6..5fa029a0 100644 --- a/build/webpack.prod.conf.js +++ b/build/webpack.prod.conf.js @@ -57,7 +57,7 @@ const webpackConfig = merge(baseWebpackConfig, { favicon: resolve('favicon.ico'), title: 'vue-element-admin', templateParameters: { - BASE_URL: config.build.assetsPublicPath + config.build.assetsSubDirectory, + BASE_URL: config.build.assetsPublicPath + config.build.assetsSubDirectory }, minify: { removeComments: true, @@ -71,7 +71,7 @@ const webpackConfig = merge(baseWebpackConfig, { // matter anyway }), new ScriptExtHtmlWebpackPlugin({ - //`runtime` must same as runtimeChunk name. default is `runtime` + // `runtime` must same as runtimeChunk name. default is `runtime` inline: /runtime\..*\.js$/ }), // keep chunk.id stable when chunk has no name diff --git a/package.json b/package.json index e5b0b9ec..d3cb8427 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,7 @@ "babel-plugin-syntax-jsx": "6.18.0", "babel-plugin-transform-runtime": "6.23.0", "babel-plugin-transform-vue-jsx": "3.7.0", + "babel-polyfill": "^6.26.0", "babel-preset-env": "1.7.0", "babel-preset-stage-2": "6.24.1", "chalk": "2.4.1", @@ -89,9 +90,9 @@ "html-webpack-plugin": "4.0.0-alpha", "husky": "0.14.3", "lint-staged": "7.2.2", - "mini-css-extract-plugin": "0.4.1", + "mini-css-extract-plugin": "^0.4.1", "node-notifier": "5.2.1", - "node-sass": "^4.7.2", + "node-sass": "^4.11.0", "optimize-css-assets-webpack-plugin": "5.0.0", "ora": "3.0.0", "path-to-regexp": "2.4.0", @@ -100,7 +101,7 @@ "postcss-loader": "2.1.6", "postcss-url": "7.3.2", "rimraf": "2.6.2", - "sass-loader": "7.0.3", + "sass-loader": "^7.0.3", "script-ext-html-webpack-plugin": "2.0.1", "script-loader": "0.7.2", "semver": "5.5.0",