2023-03-01 14:20:58 +00:00
|
|
|
const path = require('path');
|
|
|
|
const CopyPlugin = require('copy-webpack-plugin');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
mode: 'development',
|
2024-06-02 15:31:33 +00:00
|
|
|
entry: ['./src/main.ts'],
|
2023-03-01 14:20:58 +00:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
use: 'ts-loader',
|
|
|
|
exclude: /node_modules/,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.html$/i,
|
|
|
|
type: 'asset/resource',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
resolve: {
|
|
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new CopyPlugin({
|
|
|
|
patterns: [
|
|
|
|
{ from: "index.html", to: "index.html" },
|
2023-03-04 21:38:14 +00:00
|
|
|
{ from: "design.html", to: "design.html" },
|
|
|
|
// { from: "styles.css", to: "styles.css" },
|
2023-03-01 14:20:58 +00:00
|
|
|
],
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
output: {
|
|
|
|
filename: 'bundle.js',
|
|
|
|
path: path.resolve(__dirname, 'dist'),
|
|
|
|
},
|
|
|
|
};
|