lmlfc-bttv/webpack.config.js

40 lines
756 B
JavaScript
Raw Normal View History

2023-12-28 13:55:42 +00:00
const path = require("path");
2023-12-30 03:11:22 +00:00
const CopyPlugin = require("copy-webpack-plugin");
2023-12-30 01:43:11 +00:00
2023-12-28 13:55:42 +00:00
module.exports = {
entry: {
main: path.join(__dirname, "src", "main.ts"),
},
output: {
path: path.join(__dirname, "dist"),
filename: "[name].js",
},
resolve: {
extensions: [".ts", ".js"],
},
module: {
rules: [
{
2023-12-30 14:51:19 +00:00
test: /\.[jt]s$/,
exclude: /(node_modules)/,
use: [
{
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"],
},
},
{
loader: "ts-loader",
},
],
2023-12-28 13:55:42 +00:00
},
],
},
2023-12-30 03:11:22 +00:00
plugins: [
new CopyPlugin({
patterns: [{ from: ".", to: ".", context: "public" }],
}),
],
2023-12-28 13:55:42 +00:00
};