webamp/webpack.library.config.js
2017-10-09 20:54:14 -07:00

39 lines
773 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"
}
},
{
test: /\.(wsz|mp3)$/,
use: [
{
loader: "file-loader",
options: {
emitFile: true,
name: "[path][name]-[hash].[ext]"
}
}
]
}
],
noParse: [/jszip\.js$/]
},
entry: ["babel-polyfill", "./js/winamp.js"],
output: {
path: path.resolve(__dirname, "built"),
filename: "winamp.bundle.js",
library: "winamp2js",
libraryTarget: "umd"
}
};