You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've seen this situation at ByteDance for all of our monorepos, and the solution we have settled on is using tsconfig paths + changing the resolve.extensions option to accept the .ts extention (the default in Rspack). This is a solution asked by the community and is offered in the tsconfig-paths-webpack-plugin.
So I made the following setting:
pnpm workspace, with app and dep, app's dependency is dep
I want to confirm if dep's package.json is the best practice. I still need to configure "types" with an array because otherwise tsc will failed to resolve dep's type declarations.
Do you guys have better recommendations?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to configure a monorepo with modern.js and rspack. Then I found an issue regarding similar topics.
In the comment, @Boshen mentions that
So I made the following setting:
pnpm
workspace, withapp
anddep
,app
's dependency isdep
app
's tsconfig sets project referenceapp
's tsconfig set moduleResolution to bundlerdep
'spackage.json
Related doc: https://modernjs.dev/en/guides/advanced-features/source-build.html
Question
I want to confirm if
dep
'spackage.json
is the best practice. I still need to configure "types" with an array because otherwise tsc will failed to resolvedep
's type declarations.Do you guys have better recommendations?
Beta Was this translation helpful? Give feedback.
All reactions