We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is reproducible on any latest Remix project (sorry for not providing an exact repo, there is literally nothing specific to the app).
vite.config.ts
console.log(1)
npm run dev
1
System info is irrelevant.
pnpm
Vite, its configuration and plugins are executed once.
Remix executes everything Vite-related twice. This makes it impossible to write proper Vite plugins as every hook in a plugin will be called twice.
Here are the two calls traced to see their stack traces:
Trace: 1 at file://app/vite.config.ts.timestamp-1727182481040-668186ca07abb.mjs:25:9 at ModuleJob.run (node:internal/modules/esm/module_job:218:25) at async ModuleLoader.import (node:internal/modules/esm/loader:329:24) at async loadConfigFromBundledFile (file:///app/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-DG6Lorbi.js:66633:15) at async loadConfigFromFile (file:///app/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-DG6Lorbi.js:66474:24) at async resolveConfig (file:///app/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-DG6Lorbi.js:66082:24) at async _createServer (file:///app/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-DG6Lorbi.js:62700:18) at async dev (/app/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@remix-run/dev/dist/vite/dev.js:39:16) at async Object.viteDev (/app/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@remix-run/dev/dist/cli/commands.js:220:3) at async Object.run (/app/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@remix-run/dev/dist/cli/run.js:271:7) Trace: 1 at file://app/vite.config.ts.timestamp-1727182481241-1ed74236d2d8e.mjs:25:9 at ModuleJob.run (node:internal/modules/esm/module_job:218:25) at async ModuleLoader.import (node:internal/modules/esm/loader:329:24) at async loadConfigFromBundledFile (file:///app/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-DG6Lorbi.js:66633:15) at async Module.loadConfigFromFile (file:///app/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-DG6Lorbi.js:66474:24) at async configResolved (/app/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@remix-run/dev/dist/vite/plugin.js:727:37) at async Promise.all (index 1) at async resolveConfig (file:///app/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-DG6Lorbi.js:66346:3) at async _createServer (file:///app/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/vite/dist/node/chunks/dep-DG6Lorbi.js:62700:18) at async dev (/app/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/@remix-run/dev/dist/vite/dev.js:39:16)
process.pid
.ts
.mjs
The look quite identical to me. A bug, perhaps?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Reproduction
This is reproducible on any latest Remix project (sorry for not providing an exact repo, there is literally nothing specific to the app).
vite.config.ts
.console.log(1)
in the root scope of the module.npm run dev
.1
being printed twice.System Info
Used Package Manager
pnpm
Expected Behavior
Vite, its configuration and plugins are executed once.
Actual Behavior
Remix executes everything Vite-related twice. This makes it impossible to write proper Vite plugins as every hook in a plugin will be called twice.
Here are the two calls traced to see their stack traces:
process.pid
is the same across the two calls..ts
config format as well as.mjs
.The look quite identical to me. A bug, perhaps?
The text was updated successfully, but these errors were encountered: