Skip to content

Commit

Permalink
feat: create posibility to generate minified dist version
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopaulovieira committed Jan 18, 2020
1 parent 6852dd4 commit 845ea18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"scripts": {
"build": "webpack --progress --display-modules",
"release": "webpack -p",
"release": "MINIMIZE=true webpack -p",
"start": "webpack-dev-server"
},
"author": "Joao Paulo Vieira <[email protected]>",
Expand Down
6 changes: 6 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
let path = require('path')
let webpack = require('webpack')

const minimize = !!process.env.MINIMIZE

let configurations = {
mode: 'development',
Expand Down Expand Up @@ -55,4 +56,9 @@ let configurations = {
}
}

if (minimize) {
configurations.mode = 'production'
configurations.output.filename = 'clappr-context-menu-plugin.min.js'
}

module.exports = configurations

0 comments on commit 845ea18

Please sign in to comment.