Skip to content

Commit

Permalink
refactor(webpack): Bumped the Webpack version to v4.
Browse files Browse the repository at this point in the history
  • Loading branch information
Denyllon committed May 26, 2021
1 parent e6ea23e commit 1016801
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
8 changes: 5 additions & 3 deletions package.json
Expand Up @@ -58,7 +58,7 @@
},
"husky": {
"hooks": {
"pre-commit": "npm run lint && npm run test && npm run build && git add -A"
"pre-commit": "npm run lint && npm run test && npm run build"
}
},
"devDependencies": {
Expand All @@ -70,15 +70,17 @@
"eslint": "^4.17.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^4.2.2",
"highcharts": "^7.1.1",
"highcharts": ">=7.1.1",
"husky": "^1.0.0-rc.13",
"jest": "^24.8.0",
"jest-serializer-vue": "^2.0.2",
"standard": "^10.0.3",
"standard-version": "^8.0.1",
"uglifyjs-webpack-plugin": "^2.2.0",
"vue": "^2.6.10",
"vue-jest": "^3.0.4",
"vue-template-compiler": "^2.6.10",
"webpack": "^3.10.0"
"webpack": "^4.0.0",
"webpack-cli": "^4.7.0"
}
}
22 changes: 15 additions & 7 deletions webpack.config.js
@@ -1,7 +1,8 @@
const webpack = require('webpack')
const path = require('path')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')

module.exports = {
mode: 'production',
entry: {
'highcharts-vue': './src/index.js',
'highcharts-vue.min': './src/index.js'
Expand All @@ -18,6 +19,12 @@ module.exports = {
commonjs: 'highcharts',
commonjs2: 'highcharts',
amd: 'highcharts'
},
vue: {
root: 'Vue',
commonjs: 'vue',
commonjs2: 'vue',
amd: 'vue'
}
},
module: {
Expand All @@ -29,10 +36,11 @@ module.exports = {
}
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
include: /\.min\.js$/,
minimize: true
})
]
optimization: {
minimizer: [
new UglifyJsPlugin({
test: /\.min\.js$/
})
]
}
}

0 comments on commit 1016801

Please sign in to comment.