audioshowkit/webpack.common.cjs

36 lines
857 B
JavaScript
Raw Normal View History

const path = require("path");
const ESLintPlugin = require("eslint-webpack-plugin");
module.exports = {
2022-04-16 08:22:01 +00:00
entry: {
audioshowkit: path.resolve("./src/audioshowkitlib.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
},
]
},
output: {
filename: "[name].js",
path: path.resolve("./dist"),
library: ["[name]"],
clean: true
2022-04-16 08:22:01 +00:00
},
plugins: [
new ESLintPlugin()
]
};