Skip to content

Parcel manifest reporter fails assertion when bundle is inlined #100

@marcins

Description

@marcins

When a bundle is "inlined", for example when an SVG import should result in an SVG string, the @react-loosely-lazy/parcel-reporter-manifest fails because it expects referencedBundles to all have a filePath.

There needs to be an additional check before trying to access filePath of a referencedBundle to assert that the entry of the bundle isn't inlined.

for (const referencedBundle of referencedBundles) {
const assetDependency = relative(
referencedBundle.target.distDir,
referencedBundle.filePath
);

Something like:

if (referencedBundle.bundleBehavior === 'inline') continue;

Possibly this should also be raised with the Parcel project, because accessing the filePath should probably return null not fail an assertion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions