diff --git a/now.json b/now.json index 3fd118f823..1ef05ee8d3 100644 --- a/now.json +++ b/now.json @@ -18,7 +18,7 @@ ], "routes": [ { - "src": "/app/(.*.?bundle.js)", + "src": "/app/(.*\\.?bundle.js)$", "dest": "/compiled/$1" }, { diff --git a/webpack.config.ts b/webpack.config.ts index 94ae29c63e..658ee86f1c 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -16,7 +16,6 @@ module.exports = (env, argv) => { output: { filename: 'bundle.js', // the output bundle - path: path.resolve(__dirname, 'compiled') }, @@ -128,7 +127,6 @@ module.exports = (env, argv) => { 'webpack-dev-server/client?http://localhost:3000', 'webpack/hot/only-dev-server' ) - ;(config.output as any).publicPath = '/app' } if (argv.mode === 'production') { @@ -144,5 +142,9 @@ module.exports = (env, argv) => { } } + if (process.env.TARGET !== 'electron') { + ;(config.output as any).publicPath = '/app/' + } + return config }