mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-27 03:54:24 +00:00
56 lines
1.1 KiB
JavaScript
56 lines
1.1 KiB
JavaScript
const path = require("path");
|
|
const webpack = require("webpack");
|
|
const HtmlWebpackPlugin = require("html-webpack-plugin");
|
|
|
|
module.exports = {
|
|
devtool: "source-map",
|
|
resolve: {
|
|
extensions: [".js"]
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/,
|
|
use: ["style-loader", "css-loader"]
|
|
},
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /(node_modules)/,
|
|
use: {
|
|
loader: "babel-loader"
|
|
}
|
|
},
|
|
{
|
|
test: /\.(wsz|mp3|png|ico|jpg|svg)$/,
|
|
use: [
|
|
{
|
|
loader: "file-loader",
|
|
options: {
|
|
emitFile: true,
|
|
name: "[path][name]-[hash].[ext]"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
noParse: [/jszip\.js$/]
|
|
},
|
|
plugins: [
|
|
new webpack.DefinePlugin({
|
|
SENTRY_DSN: JSON.stringify(
|
|
"https://c8c64ef822f54240901bc64f88c234d8@sentry.io/146022"
|
|
)
|
|
}),
|
|
new HtmlWebpackPlugin({
|
|
template: "./index.html"
|
|
})
|
|
],
|
|
entry: {
|
|
winamp: ["./js/index.js"]
|
|
},
|
|
output: {
|
|
filename: "[name]-[hash].js",
|
|
publicPath: "/",
|
|
path: path.resolve(__dirname, "built")
|
|
}
|
|
};
|