In a Electron-React-Typescript app I'm getting this error:
Automatic publicPath is not supported in this browser
devDependencies in package.json :
"css-minimizer-webpack-plugin": "^1.2.0",
"electron": "^11.2.3",
"typescript": "^4.1.5",
"webpack": "^5.21.2",
"webpack-bundle-analyzer": "^4.4.0",
"webpack-cli": "^4.5.0",
"webpack-dev-server": "^3.11.2"
Following the indications found here: Webpack5 Automatic publicPath is not supported in this browser
webpack.rules.config.js :
// Images Loader
test: /\.(gif|jpe?g|tiff|png|webp|bmp)$/,
use: [
{
loader: 'file-loader',
options: {
//publicPath: '',
publicPath: inDev ? 'images' : './main_window/images',
outputPath: inDev ? 'images' : './main_window/images',
},
},
I tried both to set the publicPath to empty and to fill with the value of outputPath. also removed mini-css-extract-plugin. But none of these worked.
Any suggestions?