From be59b94b127a1ddc38c85370005ab535559c87bf Mon Sep 17 00:00:00 2001 From: tkiefer24 <86222048+tkiefer24@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:58:16 +0200 Subject: [PATCH 1/2] fix: build also cjs for legacy integration --- vite.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.js b/vite.config.js index cc19794..ae67058 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,7 +6,7 @@ import vue from '@vitejs/plugin-vue'; export default defineConfig({ build: { lib: { - formats: ['es'], + formats: ['es', 'cjs'], entry: resolve(__dirname, 'src', 'index.ts'), name: 'ReduxVuex', fileName: (format) => `redux-vuex.${format}.js`, From 1ae3c50ab1ae0f698febd12cee6b243bbfc9e910 Mon Sep 17 00:00:00 2001 From: tkiefer24 <86222048+tkiefer24@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:59:28 +0200 Subject: [PATCH 2/2] fix: export commonjs build for legacy integration --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index eb823eb..0bac487 100644 --- a/package.json +++ b/package.json @@ -31,10 +31,12 @@ "vue": "3.x" }, "module": "./dist/redux-vuex.es.js", + "main": "./dist/redux-vuex.cjs.js", "types": "./dist/typings/index.d.ts", "exports": { ".": { "import": "./dist/redux-vuex.es.js", + "require": "./dist/redux-vuex.cjs.js", "types": "./dist/typings/index.d.ts" } },