Skip to content

Commit 5410816

Browse files
committed
Fix issue with manifest not existing when the legacy asset bundle occurs
1 parent 016bf04 commit 5410816

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ export default function laravel(config: string|string[]|PluginConfig): LaravelPl
184184
}
185185

186186
const manifestPath = path.resolve(resolvedConfig.root, resolvedConfig.build.outDir, manifestConfig)
187+
188+
if (! fs.existsSync(manifestPath)) {
189+
// The manifest does not exist yet when first writing the legacy asset bundle.
190+
return;
191+
}
192+
187193
const manifest = JSON.parse(fs.readFileSync(manifestPath).toString())
188194
const newManifest = {
189195
...manifest,

0 commit comments

Comments
 (0)