Replies: 1 comment 2 replies
-
We have tried to bundle the config file with You can refer to these issues for background:
In the long term, I think we can use Node.js built-in --experimental-strip-types to load TypeScript config file. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Here's why I think you can replace jiti with rspack
1: Rsbuild currently uses jiti to load configuration files, rspack is a bundle tool used by rsbuild to build web applications, and jiti itself also provides a set of compile ability, so it feels redundant。
2: jiti does not support top level await
So,We can use rspack as an entry when the configuration file extension name is ts。
The strategy is to eliminate node built-in and node_module dependencies, build code, then write it to rspack's file system, and then export it,rspack also supports these features。
I tried building my own configuration file with top level await using rspack not long ago, but the output was in esm format where default was undefined。
So I had to give up and not start issure and discuss my idea. How did the team consider this
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions