audioshowkit/showcase/webpack.common.js

39 lines
968 B
JavaScript
Raw Normal View History

2022-04-16 08:22:01 +00:00
import path from "path";
import HtmlWebpackPlugin from "html-webpack-plugin";
export default {
entry: {
2022-04-16 08:22:01 +00:00
audioshowkit: path.resolve("./src/audioshowkit.js"),
},
module: {
rules: [
{
2022-04-16 08:22:01 +00:00
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"]
}
}
},
{
test: /\.css$/i,
2022-04-15 20:34:43 +00:00
use: ["style-loader", "css-loader"],
2022-04-16 08:22:01 +00:00
},
{
test: /\.html$/i,
loader: "html-loader",
},
]
},
output: {
filename: "[name].js",
2022-04-16 08:22:01 +00:00
path: path.resolve("./dist")
},
plugins: [
new HtmlWebpackPlugin({
template: path.resolve("./src/index.html"),
2022-04-16 08:22:01 +00:00
})
]
};