Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bundle libraries assets like @vercel/ncc #492

onigoetz started this conversation in Ideas
Discussion options

Hi,
thanks for all your work on rspack/rsbuild/rslib it is very promising and I look forward to use it more in my libraries and apps :)

I am currently using @vercel/ncc to compile some dependencies in my projects, but sadly its ESM support is not great.
Rslib has great ESM support but lacks some features to fully replace ncc.

In NCC, calls to require.resolve are replaced by a path to a static asset, and the asset it found is copied in the dist folder.
In Rslib, require.resolve is preserved and fails when running the compiled dependency since the files are absent.

Is that something you plan to support in the future ?

I created a reproduction here : https://github.com/onigoetz/ncc-repro

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

Thanks for your suggestion, we do have plans to make Rslib provide better support for bundling Node.js modules, which means Rslib will learn from ncc and improve support for require.resolve.

There is no clear timeline for this yet. We may support this after completing the Rslib core features.

You must be logged in to vote
1 reply
Comment options

Thanks for the feedback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /