-
-
Notifications
You must be signed in to change notification settings - Fork 568
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
[Feature Request]: Write rspack config in typescript #2188
Comments
you can use ts-node/register to handle ts config support right now, we will support ts config out of box in the future
require('ts-node/register');
your config here |
Hi @hardfist , can I take this issue? |
Hi rspack team, I found webpack uses rechoir and interpret to load JS variants. Is it the desirable way to do it? Or do you prefer using minimal dependencies? https://github.com/webpack/webpack-cli/blob/master/packages/webpack-cli/src/webpack-cli.ts#L1723 |
we prefer minimal |
@hardfist What is the performance of using |
Also might be bit early, but any idea how the NodeJS experimental Typescript Support will change the current approach? |
What problem does this feature solve?
Webpack config can be written in a ts file (webpack.config.ts). It would be very helpful to be able to do this for rspack as well, since we get type and ESM syntax support, and it makes it much easier to migrate existing configs to rspack. (existing webpack config may also have dependencies on other TS files, so it's not good to have to convert those to JS as well.)
What does the proposed API of configuration look like?
rspack.config.ts - follow webpack.
The text was updated successfully, but these errors were encountered: