Skip to content

The onLoad filter should always filter fully resolved path to a file #2616

Closed
@KingSora

Description

Good day!

Recently I've encountered a weird behvior regarding the filter for a onLoad callback. (remix-run/remix#4130)
My code looks like this:

build.onLoad({ filter: /\.css$/ }, () => {}); 

With this I would expect that each and every .css file will go through this onLoad callback. This is also the case unless its the entry point of a package. Packages like @fontsource/aguafina-script have its entry point set as main: "index.css".

I'm not sure what causes this, and its possible that this behavior is implemented on purpose, but I would expect that the filter for the onLoad callback always filters the fully resolved path to a file.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions