Skip to content

Commit

Permalink
Fix manifest handling in SSR mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jessarcher committed Jun 13, 2022
1 parent d8860eb commit 662a8ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,12 @@ export default function laravel(config?: string|string[]|Partial<PluginConfig>):
return null
},
writeBundle() {
const manifestPath = path.resolve(resolvedConfig.root, resolvedConfig.build.outDir, 'manifest.json')
const manifestConfig = resolvedConfig.build.ssr ? resolvedConfig.build.ssrManifest : resolvedConfig.build.manifest;
if (manifestConfig === false) {
return;
}
const manifestFile = typeof manifestConfig === 'string' ? manifestConfig : 'manifest.json'
const manifestPath = path.resolve(resolvedConfig.root, resolvedConfig.build.outDir, manifestFile)
const manifest = JSON.parse(fs.readFileSync(manifestPath).toString())
const newManifest = {
...manifest,
Expand Down

0 comments on commit 662a8ab

Please sign in to comment.