webamp/webpack.library.config.js
Jordan Eldredge b241bffb88 Exclude polyfills from UMD build.
Improve docs for npm module
2018-02-17 21:55:54 -08:00

42 lines
821 B
JavaScript

const path = require("path");
module.exports = {
module: {
rules: [
{
test: /\.css$/,
use: ["style-loader", "css-loader"]
},
{
test: /\.js$/,
exclude: /(node_modules)/,
use: {
loader: "babel-loader",
options: {
forceEnv: "library"
}
}
},
{
test: /\.(wsz|mp3)$/,
use: [
{
loader: "file-loader",
options: {
emitFile: true,
name: "[path][name]-[hash].[ext]"
}
}
]
}
],
noParse: [/jszip\.js$/]
},
entry: ["./js/winamp.js"],
output: {
path: path.resolve(__dirname, "built"),
filename: "winamp.bundle.js",
library: "winamp2js",
libraryTarget: "umd"
}
};