webamp/webpack.config.js
Jordan Eldredge a98d1cc344 Make built/ the deployed root
Also fixes cache-busting of all non-html assets.
2018-03-14 20:42:33 -07:00

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")
}
};