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

fix: invalid JS in README #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marvinhagemeister
Copy link

There is no import { Foo as default } from ".." in JS. default cannot be used there as a keyword.

@iuioiua
Copy link
Contributor

iuioiua commented Oct 16, 2023

@marvinhagemeister
Copy link
Author

@iuioiua It does work in SaaSKit because it's using an export statement instead of an import statement. The foo as default syntax is perfectly fine with export statements. But in the README it's used as part of an import statement and that's not valid JavaScript.

@iuioiua
Copy link
Contributor

iuioiua commented Oct 16, 2023

Oh, I see. In that case, since the problematic LOC is in an island, should the example then be this:

- import { Chart as default } from "$fresh_charts/island.tsx";
+ export { Chart as default } from "$fresh_charts/island.tsx";

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

Successfully merging this pull request may close these issues.

2 participants