42 lines
870 B
JavaScript
42 lines
870 B
JavaScript
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
|
const path = require('path');
|
|
|
|
module.exports = {
|
|
entry: "./src/bootstrap.js",
|
|
output: {
|
|
path: path.resolve(__dirname, "dist"),
|
|
filename: "bootstrap.js",
|
|
},
|
|
mode: "development",
|
|
plugins: [
|
|
new CopyWebpackPlugin({ patterns: ['index.html', 'css/*.css'] })
|
|
],
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
use: 'ts-loader',
|
|
exclude: /node_modules/,
|
|
},
|
|
{
|
|
test: /\.css$/i,
|
|
use: ["style-loader", "css-loader"],
|
|
}
|
|
],
|
|
// parser: {
|
|
// javascript : { importMeta: false }
|
|
// }
|
|
},
|
|
resolve: {
|
|
extensions: ['.tsx', '.ts', '.js'],
|
|
},
|
|
experiments: {
|
|
asyncWebAssembly: true,
|
|
syncWebAssembly: true,
|
|
},
|
|
// output: {
|
|
// filename: 'bundle.js',
|
|
// path: path.resolve(__dirname, 'dist'),
|
|
// },
|
|
};
|