From e985a1ade6f6280f4a44af1678a1af30c1e2ea61 Mon Sep 17 00:00:00 2001 From: Davide Segullo Date: Mon, 13 Nov 2023 18:22:31 +0100 Subject: [PATCH] chore(react): :wrench: add preserve module --- packages/react/package.json | 1 + packages/react/vite.config.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/react/package.json b/packages/react/package.json index 96ff35be..9d928d35 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -13,6 +13,7 @@ ], "version": "0.3.7", "sideEffects": false, + "type": "module", "dependencies": { "@quirks/store": "*", "@quirks/core": "*" diff --git a/packages/react/vite.config.ts b/packages/react/vite.config.ts index 15dc04b6..cacfe3a7 100644 --- a/packages/react/vite.config.ts +++ b/packages/react/vite.config.ts @@ -35,6 +35,9 @@ export default defineConfig({ formats: ['es', 'cjs'], }, rollupOptions: { + output: { + preserveModules: true, + }, // External packages that should not be bundled into your library. external: [ 'react',