Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Feb 20, 2025
1 parent a3d96b6 commit d0739ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vike/node/plugin/plugins/buildConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function buildConfig(): Plugin[] {
sequential: true,
async handler(options, bundle) {
if (this.environment.name === 'ssr') {
await writeTempManifest(getOutDirs(this.environment.config))
await writeAssetsManifestFile(getOutDirs(this.environment.config))
}
if (viteIsSSR(this.environment.config)) {
// Replace __VITE_ASSETS_MANIFEST__ in all server-side bundles
Expand All @@ -135,7 +135,7 @@ function buildConfig(): Plugin[] {
sequential: true,
async handler(options, bundle) {
if (viteIsSSR(config)) {
await writeTempManifest(getOutDirs(config))
await writeAssetsManifestFile(getOutDirs(config))
await set_ASSETS_MANIFEST(options, bundle, assetsJsonFilePath)
}
}
Expand All @@ -146,7 +146,7 @@ function buildConfig(): Plugin[] {
// Ideally we'd move dist/_temp_manifest.json to dist/server/client-assets.json instead of dist/assets.json
// - But we can't because there is no guarentee whether dist/server/ is generated before or after dist/client/ (generating dist/server/ after dist/client/ erases dist/server/client-assets.json)
// - We'll able to do so once we replace `$ vite build` with `$ vike build`
async function writeTempManifest(outDirs: OutDirs) {
async function writeAssetsManifestFile(outDirs: OutDirs) {
assetsJsonFilePath = path.posix.join(outDirs.outDirRoot, 'assets.json')
const clientManifestFilePath = path.posix.join(outDirs.outDirClient, manifestTempFile)
const serverManifestFilePath = path.posix.join(outDirs.outDirServer, manifestTempFile)
Expand Down

0 comments on commit d0739ad

Please sign in to comment.