diff options
| author | navewindre <boneyaard@gmail.com> | 2025-11-11 08:11:24 +0100 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2025-11-11 08:11:24 +0100 |
| commit | f5e29189f70c5c8532916504a1a22f8c586f6e73 (patch) | |
| tree | 9bf42144e608260527766e128268b380231ed95b /web/webpack-dev.config.cjs | |
| parent | 6442494822d12c23cdd609031c4039d3309b64f6 (diff) | |
new web
Diffstat (limited to 'web/webpack-dev.config.cjs')
| -rw-r--r-- | web/webpack-dev.config.cjs | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/web/webpack-dev.config.cjs b/web/webpack-dev.config.cjs new file mode 100644 index 0000000..4fa4b07 --- /dev/null +++ b/web/webpack-dev.config.cjs @@ -0,0 +1,45 @@ +const path = require('path'); +const HtmlWebpackPlugin = require('html-webpack-plugin'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); + +module.exports = { + mode: 'development', + entry: './src/index-page.tsx', + module: { + rules: [ + { + test: /\.tsx?$/, + use: { + loader: 'ts-loader', + options: { + compilerOptions: { + module: 'es2020' + } + } + }, + exclude: /node_modules/, + } + ], + }, + resolve: { + extensions: ['.tsx', '.jsx', ".js"], + }, + output: { + filename: 'bundle.js', + path: path.resolve(__dirname, 'dist') + }, + plugins: [ + new HtmlWebpackPlugin({ + template: './src/index.html', + }), + new CopyWebpackPlugin({ + patterns: [ + { from: './static/**' } + ] + }) + ], + devServer: { + historyApiFallback: true, + port: 9000, + }, +}; |
