From 59c5f717684a2204bb0d1120155fb0471d2313d2 Mon Sep 17 00:00:00 2001 From: Nick Playfair <842413+nplayfair@users.noreply.github.com> Date: Wed, 11 Jun 2025 14:39:20 +0100 Subject: [PATCH] Change bundle link for dev server --- html/index.html | 2 +- webpack.dev.js | 31 +++++++++++++++++++++---------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/html/index.html b/html/index.html index c157fc0..4485cca 100644 --- a/html/index.html +++ b/html/index.html @@ -30,6 +30,6 @@

       
     
-    
+    
   
 
diff --git a/webpack.dev.js b/webpack.dev.js
index 19ceaf3..d7008c2 100644
--- a/webpack.dev.js
+++ b/webpack.dev.js
@@ -1,28 +1,39 @@
-const path = require("path");
+const path = require('path');
+const CopyWebpackPlugin = require('copy-webpack-plugin');
 module.exports = {
-  mode: "development",
-  entry: "./src/index.ts",
-  devtool: "inline-source-map",
+  mode: 'development',
+  entry: './src/index.ts',
+  devtool: 'inline-source-map',
   devServer: {
     static: {
-      directory: path.join(__dirname, "./"),
+      directory: path.join(__dirname, './'),
     },
   },
   module: {
     rules: [
       {
         test: /\.tsx?$/,
-        use: "ts-loader",
+        use: 'ts-loader',
         exclude: /node_modules/,
       },
     ],
   },
   resolve: {
-    extensions: [".tsx", ".ts", ".js"],
+    extensions: ['.tsx', '.ts', '.js'],
   },
   output: {
-    filename: "bundle.js",
-    path: path.resolve(__dirname, "dist"),
-    publicPath: "/dist",
+    filename: 'bundle.js',
+    path: path.resolve(__dirname, 'dist'),
+    publicPath: '/dist',
   },
+  plugins: [
+    new CopyWebpackPlugin({
+      patterns: [
+        {
+          from: 'html/**/*',
+          to: '[name][ext]',
+        },
+      ],
+    }),
+  ],
 };