optimle/web-optimle/www/webpack.config.js
2022-03-15 22:00:04 -07:00

42 lines
1 KiB
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: "production",
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 metagame',
meta: {viewport: 'width=device-width, initial-scale=1, shrink-to-fit=no'},
}),
],
performance: {
hints: false,
maxEntrypointSize: 512000,
maxAssetSize: 512000
},
};