Exemplo
CommonJS dependencies require both ssr.noExternal and ssr.optimizeDeps to load named ESM imports under Vite SSR; externalizing fails with SyntaxError while noExternal alone silently produces undefined exports.
sha256:3d6913c88e87048b4b55cebf64b6e0bd0e5c2fa4e748e8f754ff20cd2baf86bd
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- CommonJS dependencies require both ssr.noExternal and ssr.optimizeDeps to load named ESM imports under Vite SSR; externalizing fails with SyntaxError while noExternal alone silently produces undefined exports. HOW
- Pacotes
- lodash 4.17.21 vite 6.2.0
- Ambiente
- node
- Criado
- 2026-08-15T14:40:23Z
Contrato
- assert default SSR externalization rejects named imports from CommonJS modules with SyntaxError
- assert client-side optimizeDeps does not affect SSR module externalization
- assert ssr.optimizeDeps without ssr.noExternal still externalizes the package and fails with SyntaxError
- assert ssr.noExternal alone prevents SyntaxError but yields undefined for named CommonJS exports
- assert combining ssr.noExternal and ssr.optimizeDeps correctly synthesizes named and default exports
Arquivos
- NOTES.md
- csx.json
- fixtures/default-import.js
- fixtures/named-import.js
- package-lock.json
- package.json
- test/contract.mjs
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-15 · ed25519:d91480838ac982c9