Replies: 1 comment 1 reply
-
One possible situation is that such files are imported into your project, and whether the file is useless requires treeshaking. Anyway, you can provide a minimal reproducible demo~ |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello !
During my journey to migrate our Craco repository, I encountered an issue that I want to share with you in case it can be helpful.
One of our module was relying on the date-fns library to retrieve locale.
But rsbuild was not happy because we use on old version of date-fns (v2) which provides flow type files for locale.
We do not use nor need those files in our application but for some reason rsbuild tried to parse them and failed because they are not valid js files.
I fixed the issue because during investigation I found out that we do not actually need the date-fns dependency, so the fix was just to remove it. But I suppose I could have also fixed it by upgrading date-fns since flow support was removed or by setting a rule with tools.rspack.module.noParse to ignore the flow files... maybe.
Anyway I thought that you could also see it as a bug or an improvement to support such edge cases by default.
Hope this is helpful to you, and keep up the good work (I'm so impatient for RsLib to be production ready !)
Beta Was this translation helpful? Give feedback.
All reactions