Skip to content

Manifest key problem with "build cache" + copyFiles with non-fresh cache #936

@weaverryan

Description

@weaverryan

Hi!

I just hit a bug when you combine Encore.enableBuildCache with Encore.copyFiles(). When you build fresh (no cache, easy to replicate by removing node_modules/.cache/), the manifest.json contains entries like this:

"build/images/chart.png": "/build/images/chart.db1f878a.png",

But if you build again when there is already cache available (easy to replicate by running yarn watch and modifying any file), then you get:

"build/images/chart.db1f878a.png": "/build/images/chart.db1f878a.png",

Notice they key has the version.

Btw, my guess is that this is a bug with webpack-manifest-plugin & the build cache, not actually with copyFiles(). It's just that copyFiles() is the only place in the system that uses file-loader... which is probably related.

Cheers!

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