-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(vite-plugin-angular): use babel to make transform results compati… #231
Conversation
✅ Deploy Preview for analog-app ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for analog-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
The second transform is only applied at build time to Angular libraries that need it. What's the error with Prism? |
I'll need to find some time to look at it again, but it was something along the lines of: I think applying the transformation only on build would be fine too. I think devs can live with ng serve only working in non WebKit browsers as long as the assets built work in Safari and every iOS browser |
6ec42a9
to
0b9bbe9
Compare
✅ Deploy Preview for analog-blog ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@brandonroberts the error was: I updated the PR to what I think is the least intrusive way of getting This keeps the development experience as is but makes the built assets work on iOS and Safari. Let me know what you think 👍 |
0f8ebad
to
bb9d5fb
Compare
@goetzrobin I like this option and I think that's a reasonable change |
…ble with Webkit Angular's compilation results use static blocks by default. These static blocks are not supported by Safari or other webkit based browsers. https://caniuse.com/mdn-javascript_classes_static_initialization_blocks We need to use babel transformations to make the output compatible with iOS if we want to support them. Closes analogjs#202
bb9d5fb
to
568c153
Compare
…ble with Webkit
Angular's compilation results use static blocks by default. These static blocks are not supported by Safari or other webkit based browsers. https://caniuse.com/mdn-javascript_classes_static_initialization_blocks We need to use babel transformations to make the output compatible with iOS. This is for serving content in development as well as building for production.
Closes #202
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Which package are you modifying?
What is the current behavior?
Analog output is broken in Webkit based (Safari & all iOS) browsers.
Issue Number: #202
What is the new behavior?
Analog works as expected in Webkit based browsers
Does this PR introduce a breaking change?
Other information
This is just a PR to share my findings and the patch that got it to work.
I hope someone with more insight can explain why it works and if there is a better way to achieve the same results.