chiark / gitweb /
Fix needed for changes in webpack
authorMarnanel Thurman <marnanel@thurman.org.uk>
Mon, 29 Nov 2021 23:21:20 +0000 (23:21 +0000)
committerMarnanel Thurman <marnanel@thurman.org.uk>
Mon, 29 Nov 2021 23:21:20 +0000 (23:21 +0000)
webpack.config.js

index ce22dffcd1b7bb3a8ca0f36a5f28043d0e9a44f6..a275a4aefe681863b4dc741e93993c3451f1f9d3 100644 (file)
@@ -1,4 +1,5 @@
 const path = require('path')
+const webpack = require('webpack')
 
 module.exports = {
         mode: 'development',
@@ -21,5 +22,12 @@ module.exports = {
                                 }
                         },
                 ],
-        }
+        },
+        plugins: [
+                // fix "process is not defined" error:
+                // https://stackoverflow.com/questions/41359504/webpack-bundle-js-uncaught-referenceerror-process-is-not-defined
+                new webpack.ProvidePlugin({
+                        process: 'process/browser',
+                }),
+        ]
 }