Add publicPath for static js (#1672)
authorSander Saarend <sander@saarend.com>
Thu, 29 Jun 2023 02:45:44 +0000 (05:45 +0300)
committerGitHub <noreply@github.com>
Thu, 29 Jun 2023 02:45:44 +0000 (22:45 -0400)
Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
webpack.config.js

index 4d95a80c1484e30b5bde627261f25f1a3d57923f..a2b31d04383f752d93d99a739fd9fad42ab044c8 100644 (file)
@@ -96,6 +96,7 @@ const createClientConfig = (_env, mode) => {
     entry: "./src/client/index.tsx",
     output: {
       filename: "js/client.js",
+      publicPath: "/static/",
     },
     plugins: [
       ...base.plugins,
@@ -106,7 +107,7 @@ const createClientConfig = (_env, mode) => {
             "/": "/static/",
           },
           cacheId: "lemmy",
-          include: [/(assets|styles)\/.+\..+|client\.js$/g],
+          include: [/(assets|styles|js)\/.+\..+$/g],
           inlineWorkboxRuntime: true,
           runtimeCaching: [
             {