Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(css): only use files the current bundle contains #16684

Merged
merged 1 commit into from
May 28, 2024

Commits on May 15, 2024

  1. fix(css): only use files the current bundle contains

    If using multiple output formats like `es` and `cjs` and running vite
    in watch mode, then `generateBundle` will be called once per output format.
    The bundle on each call only contains the files for the current output format,
    but our `pureCSSChunks` contain all files (from all output formats).
    So we need to filter the chunk list to only contain valid files,
    as otherwise `basename` will fail with:
    
    > The "path" argument must be of type string. Received undefined
    
    Signed-off-by: Ferdinand Thiessen <[email protected]>
    susnux committed May 15, 2024
    Configuration menu
    Copy the full SHA
    1891dd7 View commit details
    Browse the repository at this point in the history