From 52068dcb880c7bc99e8c640d6893ee00566fa5c7 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Fri, 16 Mar 2018 17:59:03 +0800 Subject: [PATCH] refactor: use @nuxtjs/friendly-errors-webpack-plugin --- lib/builder/webpack/client.config.js | 2 +- package.json | 2 +- yarn.lock | 23 +++++++++-------------- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/lib/builder/webpack/client.config.js b/lib/builder/webpack/client.config.js index 004e9628f4..1d874382af 100644 --- a/lib/builder/webpack/client.config.js +++ b/lib/builder/webpack/client.config.js @@ -3,7 +3,7 @@ const webpack = require('webpack') // const VueSSRClientPlugin = require('vue-server-renderer/client-plugin') const VueSSRClientPlugin = require('./plugins/vue/client') const HTMLPlugin = require('html-webpack-plugin') -const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin') +const FriendlyErrorsWebpackPlugin = require('@nuxtjs/friendly-errors-webpack-plugin') const StylishPlugin = require('webpack-stylish') const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') const { resolve } = require('path') diff --git a/package.json b/package.json index fbf722a4fe..360184227a 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "npm": ">=5.0.0" }, "dependencies": { + "@nuxtjs/friendly-errors-webpack-plugin": "^2.0.0", "@nuxtjs/youch": "^4.2.3", "ansi-html": "^0.0.7", "autoprefixer": "^8.1.0", @@ -75,7 +76,6 @@ "extract-text-webpack-plugin": "^4.0.0-beta.0", "file-loader": "^1.1.11", "fresh": "^0.5.2", - "friendly-errors-webpack-plugin": "^1.6.1", "fs-extra": "^5.0.0", "glob": "^7.1.2", "hash-sum": "^1.0.2", diff --git a/yarn.lock b/yarn.lock index e05331c921..6936bcfe8b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -122,6 +122,15 @@ pretty-ms "^0.2.1" text-table "^0.2.0" +"@nuxtjs/friendly-errors-webpack-plugin@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@nuxtjs/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-2.0.0.tgz#70fb321c78362e2b4bce1d522ecdf7f87a4dacec" + dependencies: + chalk "^2.3.2" + error-stack-parser "^2.0.0" + string-width "^2.0.0" + strip-ansi "^4.0.0" + "@nuxtjs/youch@^4.2.3": version "4.2.3" resolved "https://registry.yarnpkg.com/@nuxtjs/youch/-/youch-4.2.3.tgz#36f8b22df5a0efaa81373109851e1d857aca6bed" @@ -3214,14 +3223,6 @@ fresh@0.5.2, fresh@^0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" -friendly-errors-webpack-plugin@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.6.1.tgz#e32781c4722f546a06a9b5d7a7cfa28520375d70" - dependencies: - chalk "^1.1.3" - error-stack-parser "^2.0.0" - string-length "^1.0.1" - from2@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" @@ -7047,12 +7048,6 @@ strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" -string-length@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac" - dependencies: - strip-ansi "^3.0.0" - string-width@^1.0.1, string-width@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"