From ef52d98fdd6da6d1be6007e2559aadf62a4b2ac0 Mon Sep 17 00:00:00 2001 From: Jakub Juszczak Date: Fri, 9 Feb 2018 16:44:33 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20missing=20sourcemap=20Clos?= =?UTF-8?q?es=20#306?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/webpack.release.js | 6 ++++-- package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build/webpack.release.js b/build/webpack.release.js index 7ac90bc8..4394e28c 100644 --- a/build/webpack.release.js +++ b/build/webpack.release.js @@ -19,6 +19,7 @@ module.exports = { entry: { 'vue-chartjs': './src/index.js' }, + devtool: 'source-map', output: { filename: './dist/[name].js', library: 'VueChartJs', @@ -82,7 +83,7 @@ module.exports = { } if (process.env.NODE_ENV === 'production') { - delete module.exports.devtool + // delete module.exports.devtool module.exports.plugins = [ new webpack.DefinePlugin({ 'process.env': { @@ -92,7 +93,8 @@ if (process.env.NODE_ENV === 'production') { new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false - } + }, + sourceMap: true }) ] } diff --git a/package.json b/package.json index 094c12d1..e65a23f3 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "e2e": "node test/e2e/runner.js", "test": "npm run unit", "lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs", - "release": "webpack --progress --hide-modules --config ./build/webpack.release.js && cross-env NODE_ENV=production webpack --progress --hide-modules --config ./build/webpack.release.min.js", + "release": "cross-env NODE_ENV=production webpack --progress --hide-modules --config ./build/webpack.release.js && cross-env NODE_ENV=production webpack --progress --hide-modules --config ./build/webpack.release.min.js", "prepublishOnly": "yarn run lint && yarn run test && yarn run build" }, "dependencies": {},