Repository navigation
fix(init): write ESM config files in CommonJS packages - #970
Merged
Merged
Conversation
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-init-commonjs-vite-config-void-cloud.voidzero-docs.workers.dev (commit 17e6c65)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
hyfdev
marked this pull request as ready for review
November 29, 2026 01:41
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
cpojer
pushed a commit
that referenced
this pull request
Nov 29, 2026
Every dev, build and preview of a new Svelte starter prints:
```
[vite-plugin-svelte] no Svelte config found at /path/to/app - using default configuration.
```
The starter now includes a `svelte.config.mjs` that exports `{}`, so the
notice goes away and the compiler options stay the same.
An unedited copy of this config doesn't stop `void init` from
scaffolding in an otherwise empty directory.
Builds on #970, which fixes starters in CommonJS packages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a package with
"type": "commonjs", whichnpm init -ywrites, the React, Vue, Svelte and Solid starters fromvoid initfail in dev, build and preview:In these packages, the starters now use
vite.config.mts, and all four work.An inferred env schema goes to
env.mtsthere, becausevoid env checkcan't loadenv.ts(Cannot use import statement outside a module).When
sourceDiris set, the inferred schema now goes there, where Void reads it, instead of to a root file Void ignores.The warning from #176 to add
"type": "module"is removed, because it only showed after the Vite config had loaded as ESM, and those builds work.