Skip to content

Commit

Permalink
chore(deps): fix potetial security vulnerablilities issues
Browse files Browse the repository at this point in the history
- chore(deps): fix potetial security vulnerablilities issues
- chore(deps): use terser-webpack-plugin instead of uglifyjs-webpack-plugin

https://github.com/webpack-contrib/uglifyjs-webpack-plugin
  • Loading branch information
kimyvgy committed Dec 25, 2019
1 parent 80e1fc9 commit 08e046e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dist/simple-scrollspy.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
},
"homepage": "https://kimyvgy.github.io/simple-scrollspy/demo",
"devDependencies": {
"uglifyjs-webpack-plugin": "^1.2.4",
"terser-webpack-plugin": "^2.3.1",
"webpack": "^4.4.1",
"webpack-cli": "^2.0.13"
"webpack-cli": "^3.3.10"
}
}
15 changes: 8 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
const {resolve} = require('path')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const { resolve } = require('path')
const TerserPlugin = require('terser-webpack-plugin')

module.exports = {
entry: resolve(__dirname, 'src/index.js'),

output: {
path: resolve(__dirname, 'dist'),
filename: 'simple-scrollspy.min.js',
library: 'scrollSpy',
libraryTarget: 'umd'
},
plugins: [
new UglifyJsPlugin({
exclude: [/\.min\.js$/gi] // skip pre-minified libs
})
]

optimization: {
minimize: true,
minimizer: [new TerserPlugin()],
},
}

0 comments on commit 08e046e

Please sign in to comment.