-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Support an async function to provide vite config #3565
Conversation
🦋 Changeset detectedLatest commit: 50152f8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✔️ Deploy Preview for kit-demo ready! 🔨 Explore the source changes: 50152f8 🔍 Inspect the deploy log: https://app.netlify.com/sites/kit-demo/deploys/61f93da90ca2ca00083e220a 😎 Browse the preview: https://deploy-preview-3565--kit-demo.netlify.app |
Don't think it breaks anything 🤷♂️ any help to get working would be appreciated. |
You need to run |
It would be good to update the docs and config type to show that an async function can be used too. Please also add a changeset. sidenote: |
This seems like a harmless change so I'm 👍 , though I'm curious what the use case is? You can use top-level await in your |
Ah can I? I tried to export an async function that returned a svelte.config.js object but that didn't work. Basically I have async config that I inject into the application code (typescript files not .svelte so I can't use svelte preprocess). I'm using rollup/plugin-replace via vite 🤷 |
yep, you can do this: export default {
kit: {
vite: {
plugins: [
replace(await load_replacements());
]
}
}
}; given that, do we still need this change? |
Sorry no reply @Rich-Harris tied up elsewhere! |
fixes #3436