🐛 Fix missing sourcemap

Closes #306
This commit is contained in:
Jakub Juszczak
2018-02-09 16:44:33 +01:00
parent 4cec21ed2d
commit ef52d98fdd
2 changed files with 5 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ module.exports = {
entry: { entry: {
'vue-chartjs': './src/index.js' 'vue-chartjs': './src/index.js'
}, },
devtool: 'source-map',
output: { output: {
filename: './dist/[name].js', filename: './dist/[name].js',
library: 'VueChartJs', library: 'VueChartJs',
@@ -82,7 +83,7 @@ module.exports = {
} }
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
delete module.exports.devtool // delete module.exports.devtool
module.exports.plugins = [ module.exports.plugins = [
new webpack.DefinePlugin({ new webpack.DefinePlugin({
'process.env': { 'process.env': {
@@ -92,7 +93,8 @@ if (process.env.NODE_ENV === 'production') {
new webpack.optimize.UglifyJsPlugin({ new webpack.optimize.UglifyJsPlugin({
compress: { compress: {
warnings: false warnings: false
} },
sourceMap: true
}) })
] ]
} }

View File

@@ -53,7 +53,7 @@
"e2e": "node test/e2e/runner.js", "e2e": "node test/e2e/runner.js",
"test": "npm run unit", "test": "npm run unit",
"lint": "eslint --ext .js,.vue src test/unit/specs test/e2e/specs", "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" "prepublishOnly": "yarn run lint && yarn run test && yarn run build"
}, },
"dependencies": {}, "dependencies": {},