SFPX Code splitting very hard if not impossible #8220
Unanswered
stevebeauge
asked this question in
Q&A
Replies: 1 comment
-
PLayground on https://github.com/stevebeauge/spfx-monorepo-sample (multiple branches for my multiples attempts) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I work for a company that ship products which contains several SPFX components (Webpart, customizers, ...) and external applications (Office addins, SPA, ...).
All these apps should share common components and utility code.
I found that SPFX toolchain make code splitting very difficult (or not documented?). I build monorepo for splitting my code into several packages
While simple utility "packages" are easy to manage, thanks to typescript composite flag and project reference, it became very hard when coming to shared react component, especially if you want to have these components styled using the css module pattern and if it contains localization.
My researches (several days trying to reverse engineer SFPX build chain) results in these comments :
To summarize, I'd like to have :
....
But I didn't find a "simple" guidance to achieve that
thanks for advise
Beta Was this translation helpful? Give feedback.
All reactions