Skip to content

Improve optimizeDeps.exclude suggestion warning #736

@hi-ogawa

Description

@hi-ogawa

It currently misses @ai-sdk/rsc. See wakujs/waku#1632 (comment). This is because the package has a following structure:

// react-server
@ai-sdk/rsc
  -> ./dist/rsc-server.mjs
    -> ./dist/provider.mjs
      -> ./dist/rsc-shared.mjs (use client) (not optimized)

// react-client
@ai-sdk/rsc (optimized) 
  -> ./dist/rsc-client.mjs (optimized entry)
    -> ./dist/rsc-shared.mjs (optimized internally)

The heuristics by #705 doesn't see internal dist/rsc-shared.mjs to be optimized. We probably need to use esbuild metafile output to track all files bundled by optimization. (hmm, but we can only obtain entire metafile during an optimization and not available when optimization didn't re-run)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions