From 476d274c2a0392530b218f76c33e74388d6ce25b Mon Sep 17 00:00:00 2001 From: Antonin Bas Date: Mon, 25 Mar 2024 16:15:19 -0700 Subject: [PATCH] Add "type": "module" to package.json It ensures that the ESM build of Vite is used instead of the CJS build (deprecated). See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated This is also consistent with the Vite React templates: https://github.com/vitejs/vite/blob/cdc664d4ea98d5373c3ceb2213771f1dfa4bb457/packages/create-vite/template-react-ts/package.json#L5 Because we were using TypeScript to begin with (and therefore the ESM syntax for import/export), no change is required in source files. Note that because ESM ("es") was already the default output format for rollupjs, I don't think there is any difference in the final app (index.html was already using `