Skip to content

Commit 396f6f8

Browse files
committed
fix(webpackConfig): proper BASE_URL in build, fixes #803
1 parent 81fa4fd commit 396f6f8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

__tests__/checkLogs.helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ module.exports = async ({ client, projectPath, projectName, mode }) => {
2020
// Remove any quotes
2121
appBaseUrl = appBaseUrl.replace('"', '')
2222
// Base url should be root of server or packaged asar
23-
expect(path.normalize(appBaseUrl)).toBe(
24-
isBuild ? outputPath : path.sep /* Server root */
23+
expect(appBaseUrl).toBe(
24+
isBuild ? 'app://./' : path.sep /* Server root */
2525
)
2626

2727
let appStatic = logs

lib/webpackConfig.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ async function chainWebpack (api, pluginOptions, config) {
3131
config.plugin('define').tap((args) => {
3232
args[0].__dirname = realDirname
3333
args[0].__filename = `\`\${${realDirname}}/index.html\``
34-
args[0]['process.env'].BASE_URL = realDirname
3534
args[0].__static = realDirname
3635
return args
3736
})

0 commit comments

Comments
 (0)