-
Notifications
You must be signed in to change notification settings - Fork 106
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
Read svelte.config.js
#428
Conversation
I think this makes sense. I see it as a breaking change, but we will need a new breaking release soon anyway for vite 3 support, so it's good timing. @joshwooding do you have any concerns with automatically loading the config from |
No concerns, it makes sense to me 👍🏽 |
Actually, without a |
Can you clarity why that might break? It looks like it checks if |
My concern is that by automatically using the config in |
Ah, right. Okay. I've updated that as well |
Thanks, although the logic in the svelte plugin looks a fair deal more complex: https://github.com/sveltejs/vite-plugin-svelte/blob/main/packages/vite-plugin-svelte/src/utils/load-svelte-config.ts. It's too bad that |
Yeah, the logic there is more complex, but I'm not sure it really needs to be. All Svelte projects have had |
OK, I'm on board with this. Would you mind updating the svelte example to remove this line?
And I guess convert the example to |
It turns out that |
How is that working? Is Probably because we're using typescript to compile to commonjs... |
It exports |
Ohhh, right. Thanks. |
Partially reverts #382
The reason given there was that:
However, I think that users would expect their
svelte.config.js
to be taken into account. E.g. right now the user's preprocessing configuration is ignored. The user can still pass customsvelteOptions
in.storybook/main.cjs
if they need to override their normal options for some reason (although I can't think of a reason off the top of my head why this would be necessary)You can see a number of people complaining preprocessing doesn't work here: storybookjs/addon-svelte-csf#4