Skip to content
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

Enable support for the experimental syntax 'importAssertions' #360

Open
marcuslindblom opened this issue Aug 27, 2021 · 3 comments
Open

Comments

@marcuslindblom
Copy link

In my scripts I have import sheet from "./index.css" assert { type: "css" };
How can I enable this in Klap?

This is the error I get

Add @babel/plugin-syntax-import-assertions (https://git.io/JUbkv) to the 'plugins' section of your Babel config to enable parsing.
(node:67497) UnhandledPromiseRejectionWarning: Error: SyntaxError: /Users/marcus/Library/Mobile Documents/com~apple~CloudDocs/Projects/private/wieldy/src/app/wwwroot/scripts/components/save-button/index.js: Support for the experimental syntax 'importAssertions' isn't currently enabled (5:33):
@osdevisnot
Copy link
Owner

👋 @marcuslindblom, Are import assertions ready in babel? I tried adding the @babel/plugin-syntax-import-assertions but it still errors out with invalid syntax. I assume there needs to be a @babel/plugin-transform-import-assertions for this to work?

@marcuslindblom
Copy link
Author

Sorry but I'm not sure, did you manage to make it work?

@marcuslindblom
Copy link
Author

@osdevisnot Do you think we can add this feature? I'm not sure how to add plugins to klap so I'm not capable of making a PR. I also found this discussion for rollup rollup/rollup#3799

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants