From: Marnanel Thurman Date: Mon, 29 Nov 2021 23:21:20 +0000 (+0000) Subject: Fix needed for changes in webpack X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~tthurman/git?a=commitdiff_plain;h=b8f211ec133f9a83c36c66c54ee62f8f3eefeee1;p=dwim.git Fix needed for changes in webpack --- diff --git a/webpack.config.js b/webpack.config.js index ce22dff..a275a4a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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', + }), + ] }