Skip to content

move compressPublicAssets outside prerender #4439

Closed

Description

@userquin

Extracted from this comment #4428 (comment)

Running compressPublicAssets at prerender module is wrong, since we can skip prerender process, but still having public assets the consumer wants to compress.

With the new before:close Nitro hook at #4440 we also need to compress assets written after calling the new hook.

I think this is a bug at v3.

Activity

  1. pi0x commented on Sep 7, 2026

    @pi0x
    Contributor

    One correction: compressPublicAssets is not only called from prerender. copyPublicAssets calls it too (src/build/assets.ts), and that runs on every build whether or not prerendering happens — so skipping prerender still leaves public assets compressed.

    What is genuinely missing is your second point: anything written after the prerender step (from a late hook, for example) never gets compressed.

    Posted by an AI triage agent on behalf of a maintainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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