Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Mar 13, 2024
1 parent 14b8aa4 commit 65b6903
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions vike/node/plugin/plugins/baseUrls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ function baseUrls(configVike?: ConfigVikeUserProvided): Plugin {
const bases = resolveBaseFromUserConfig(config, configVike)
baseServer = bases.baseServer
baseAssets = bases.baseAssets
const cwd = process.cwd().split('\\').join('/')
if (cwd.includes('examples/base-url-cdn')) {
baseServer = '/'
baseAssets = 'http://localhost:8080/cdn/'
}
if (cwd.includes('examples/base-url-server')) {
baseServer = '/some/base-url/'
baseAssets = 'http://localhost:8080/cdn/'
}
// We cannot define these in configResolved() because Vite picks up the env variables before any configResolved() hook is called
process.env.BASE_SERVER = baseServer
process.env.BASE_ASSETS = baseAssets
Expand Down

0 comments on commit 65b6903

Please sign in to comment.