36 lines
852 B
JavaScript
36 lines
852 B
JavaScript
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
const path = require('path');
|
|
|
|
module.exports = {
|
|
entry: "./src/bootstrap.js",
|
|
output: {
|
|
path: path.resolve(__dirname, "dist"),
|
|
filename: "bootstrap.js",
|
|
},
|
|
mode: "development",
|
|
devtool: "source-map",
|
|
resolve: {
|
|
extensions: ['', '.js', '.json', '.ts', '.tsx'],
|
|
},
|
|
experiments: {
|
|
syncWebAssembly: true,
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
exclude: /node_modules/,
|
|
use: 'ts-loader',
|
|
},
|
|
{
|
|
test: /\.css$/,
|
|
use: ['style-loader', 'css-loader'],
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
title: 'Optimle, a word guessing game',
|
|
}),
|
|
],
|
|
};
|