From feed319aa86977fbace6b11d459bfa5abe07b298 Mon Sep 17 00:00:00 2001 From: Pan Date: Tue, 14 Aug 2018 17:34:51 +0800 Subject: [PATCH] update vue-loader to v15 --- build/vue-loader.conf.js | 19 +------------------ build/webpack.base.conf.js | 4 ++++ config/index.js | 5 ----- package.json | 18 +++++++++--------- src/views/errorPage/404.vue | 16 ++++------------ 5 files changed, 18 insertions(+), 44 deletions(-) diff --git a/build/vue-loader.conf.js b/build/vue-loader.conf.js index 33ed58bc..5496c931 100644 --- a/build/vue-loader.conf.js +++ b/build/vue-loader.conf.js @@ -1,22 +1,5 @@ 'use strict' -const utils = require('./utils') -const config = require('../config') -const isProduction = process.env.NODE_ENV === 'production' -const sourceMapEnabled = isProduction - ? config.build.productionSourceMap - : config.dev.cssSourceMap module.exports = { - loaders: utils.cssLoaders({ - sourceMap: sourceMapEnabled, - extract: isProduction - }), - cssSourceMap: sourceMapEnabled, - cacheBusting: config.dev.cacheBusting, - transformToRequire: { - video: ['src', 'poster'], - source: 'src', - img: 'src', - image: 'xlink:href' - } + //You can set the vue-loader configuration by yourself. } diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js index 9936a877..06910a68 100644 --- a/build/webpack.base.conf.js +++ b/build/webpack.base.conf.js @@ -2,6 +2,7 @@ const path = require('path') const utils = require('./utils') const config = require('../config') +const { VueLoaderPlugin } = require('vue-loader') const vueLoaderConfig = require('./vue-loader.conf') function resolve (dir) { @@ -85,6 +86,9 @@ module.exports = { } ] }, + plugins: [ + new VueLoaderPlugin(), + ], node: { // prevent webpack from injecting useless setImmediate polyfill because Vue // source contains it (although only uses it if it's native). diff --git a/config/index.js b/config/index.js index 1fca1234..e89e5a11 100644 --- a/config/index.js +++ b/config/index.js @@ -38,11 +38,6 @@ module.exports = { // https://webpack.js.org/configuration/devtool/#development devtool: 'cheap-source-map', - // If you have problems debugging vue-files in devtools, - // set this to false - it *may* help - // https://vue-loader.vuejs.org/en/options.html#cachebusting - cacheBusting: true, - // CSS Sourcemaps off by default because relative paths are "buggy" // with this option, according to the CSS-Loader README // (https://github.com/webpack/css-loader#sourcemaps) diff --git a/package.json b/package.json index 521b4048..dea14984 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "driver.js": "0.5.2", "dropzone": "5.2.0", "echarts": "4.1.0", - "element-ui": "2.4.4", + "element-ui": "2.4.6", "file-saver": "1.3.8", "font-awesome": "4.7.0", "js-cookie": "2.2.0", @@ -53,7 +53,7 @@ "showdown": "1.8.6", "simplemde": "1.11.2", "sortablejs": "1.7.0", - "vue": "2.5.16", + "vue": "2.5.17", "vue-count-to": "1.0.13", "vue-i18n": "7.3.2", "vue-multiselect": "2.1.0", @@ -78,7 +78,7 @@ "chalk": "2.4.1", "copy-webpack-plugin": "4.5.2", "cross-env": "5.2.0", - "css-loader": "0.28.7", + "css-loader": "1.0.0", "eslint": "4.19.1", "eslint-friendly-formatter": "4.0.1", "eslint-loader": "2.0.0", @@ -108,14 +108,14 @@ "svg-sprite-loader": "3.8.0", "uglifyjs-webpack-plugin": "1.2.7", "url-loader": "1.0.1", - "vue-loader": "14.2.3", - "vue-style-loader": "3.0.3", - "vue-template-compiler": "2.5.16", - "webpack": "4.16.1", + "vue-loader": "15.3.0", + "vue-style-loader": "4.1.2", + "vue-template-compiler": "2.5.17", + "webpack": "4.16.5", "webpack-bundle-analyzer": "2.13.1", - "webpack-cli": "3.0.8", + "webpack-cli": "3.1.0", "webpack-dev-server": "3.1.5", - "webpack-merge": "4.1.3" + "webpack-merge": "4.1.4" }, "engines": { "node": ">= 4.0.0", diff --git a/src/views/errorPage/404.vue b/src/views/errorPage/404.vue index dccf5736..97e57b2f 100644 --- a/src/views/errorPage/404.vue +++ b/src/views/errorPage/404.vue @@ -2,10 +2,10 @@
- 404 - 404 - 404 - 404 + 404 + 404 + 404 + 404
OOPS!
@@ -21,17 +21,9 @@