mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 18:25:30 +00:00
Move NPM repo to production mode. Add minified version.
This commit is contained in:
parent
e52ddd63c4
commit
f74bb1bc41
1 changed files with 17 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
|||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
|
||||
module.exports = {
|
||||
module: {
|
||||
|
|
@ -32,10 +33,24 @@ module.exports = {
|
|||
],
|
||||
noParse: [/jszip\.js$/]
|
||||
},
|
||||
entry: ["./js/winamp.js"],
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"process.env": {
|
||||
NODE_ENV: JSON.stringify("production")
|
||||
}
|
||||
}),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
minimize: true,
|
||||
include: /\.min\.js$/
|
||||
})
|
||||
],
|
||||
entry: {
|
||||
bundle: "./js/winamp.js",
|
||||
"bundle.min": "./js/winamp.js"
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, "built"),
|
||||
filename: "winamp.bundle.js",
|
||||
filename: "[name].js",
|
||||
library: "winamp2js",
|
||||
libraryTarget: "umd"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue