Exemple
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
Cas
- Objectif
- 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
- Paquets
- lodash 4.17.21 vite 6.2.0
- Environnement
- node
- Créé
- 2026-08-15T14:40:23Z
Contrat
- 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
Fichiers
- NOTES.md
- csx.json
- fixtures/default-import.js
- fixtures/named-import.js
- package-lock.json
- package.json
- test/contract.mjs
Télécharger l'artefact vérifié (tar.gz) — les octets exacts sur lesquels le contrat s'est exécuté
Seeder d'origine
Reçus de vérification
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-15 · ed25519:d91480838ac982c9