Open ltdu opened 3 weeks ago
@ltdu: this know for a while. I opened an issue 2 years later #9073 for the same issue, as some other did : https://github.com/SharePoint/sp-dev-docs/issues?q=is%3Aissue+heft+is%3Aopen
I don't think MS is willing to fix this. The spfx build chain is built on top of an incredible complex stack of outdated tools and I guess they're stuck into this stack. Hopefully they will move to a simpler toolchain eventually. They open sourced part of the stack: https://github.com/microsoft/spfx-gulp-tools/issues but obviously (only 3 issues and zero documentation) it did not draw attention it would deserve.
That said, heft is getting quite old, suffer from very long build time and an inexisting community ecosystem compared to more modern tools like turborepo or nx. Maybe you should consider moving out from heft?
On our side we worked sucessfully with nx as build orchestrator and tsup (with a bunch of config) to build shared packages, if it can help
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
π₯ SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
SharePoint Framework YO generator supports
--use-heft
parameter, which scaffolds solution to use HEFT instead of usual GULP. However, currently building such solution fails inwebpack
step:As far as I can tell, problem originates in
@microsoft/spfx-heft-plugins
package. There iswebpackConfigurationPlugin
plugin which seems to be responsible for providing required configuration, includingwebpack
loaders. I could find CSS loaders, but configuration seems broken:*.module.scss
for processingmoduleScssCssLoaders
andcssLoaders
are essentially the same - they use@microsoft/sp-css-loader
which does not havescss
processing capabilitySteps to reproduce
Expected behavior
Solution is built successfully