[swc-angular-plugin] preserve styles for using this plugin for dev server
I have an Angular dev server using swc, this plugin solved the code transformation problem a lot.
However this plugin discards all styleUrls and replaces them with empty styles: [].
Can we have some options to preserve styles in the result, so we can use it for Angular dev server?
Thanks for raising this issue. This was indeed a shortcut we took as we focused on speeding up "browserless" testing. We should fix this.
All PRs are welcome! 😊
So I tried to add transforming styleUrls, it now works well on the dev server.
When running tests in this repo, Vitest is fine, but Jest reports error due to CSS imported as objects.
We need to either make preserving styles optional (enabled or disabled by default), or add a workaround to the existing Jest configs (might make this a breaking change).
Which one is better?