Skip to content

Commit d2a67f4

Browse files
authored
Merge pull request #38 from laravel/legacy-plugin-manifest-issue
[0.x] Fix issue with manifest not existing when the legacy asset bundle occurs
2 parents 016bf04 + 5410816 commit d2a67f4

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)