From 57ca285abb3074da3797935af366e65cdd747ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Alnet?= Date: Thu, 18 Jul 2019 01:52:51 +0200 Subject: [PATCH] fix(plugin-webpack): adjust publicPath in renderer only (#1035) This reverts improper PR#1021 and re-implements the changes I have in the JS (compiled) code at the right place. Fixes #1034. --- packages/plugin/webpack/src/WebpackPlugin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugin/webpack/src/WebpackPlugin.ts b/packages/plugin/webpack/src/WebpackPlugin.ts index b419c9f712..c4ae14baf3 100644 --- a/packages/plugin/webpack/src/WebpackPlugin.ts +++ b/packages/plugin/webpack/src/WebpackPlugin.ts @@ -333,7 +333,7 @@ Your packaged app may be larger than expected if you dont ignore everything othe path: path.resolve(this.baseDir, 'renderer'), filename: '[name]/index.js', globalObject: 'self', - publicPath: '/', + ...(this.isProd ? {} : { publicPath: '/' }), }, node: { __dirname: false, @@ -425,7 +425,7 @@ Your packaged app may be larger than expected if you dont ignore everything othe error: tab.log.bind(tab), warn: tab.log.bind(tab), }, - ...(this.isProd ? {} : { publicPath: '/' }), + publicPath: '/', hot: true, historyApiFallback: true, writeToDisk: true,