summaryrefslogtreecommitdiff
path: root/moneyjsx/webpack-prod.config.cjs
diff options
context:
space:
mode:
authoraura <nw@moneybot.cc>2026-02-17 22:39:42 +0100
committeraura <nw@moneybot.cc>2026-02-17 22:39:42 +0100
commit636b0323075225c584b62719ed51e75521bb7ffb (patch)
tree61b02271b6d0695a4beffc23fb6eb062a7da22c3 /moneyjsx/webpack-prod.config.cjs
push source
Diffstat (limited to 'moneyjsx/webpack-prod.config.cjs')
-rw-r--r--moneyjsx/webpack-prod.config.cjs48
1 files changed, 48 insertions, 0 deletions
diff --git a/moneyjsx/webpack-prod.config.cjs b/moneyjsx/webpack-prod.config.cjs
new file mode 100644
index 0000000..e850468
--- /dev/null
+++ b/moneyjsx/webpack-prod.config.cjs
@@ -0,0 +1,48 @@
+const path = require('path');
+const HtmlWebpackPlugin = require('html-webpack-plugin');
+const CopyWebpackPlugin = require('copy-webpack-plugin');
+
+module.exports = {
+ mode: 'production',
+ entry: './src/index-page.tsx',
+ module: {
+ rules: [
+ {
+ test: /\.tsx?$/,
+ use: {
+ loader: 'ts-loader',
+ options: {
+ compilerOptions: {
+ module: 'es2020'
+ }
+ }
+ },
+ exclude: /node_modules/,
+ }
+ ],
+ },
+ resolve: {
+ alias: {
+ jquery: "jquery/slim"
+ },
+ 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,
+ },
+};