Skip to content
This repository was archived by the owner on Aug 31, 2025. It is now read-only.

Commit 502fbf1

Browse files
committed
📦 add exports map
1 parent 49fe03c commit 502fbf1

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.6.1",
44
"description": "Configurable persistence and rehydration of Pinia stores.",
55
"keywords": [
6+
"pinia",
67
"pinia-plugin"
78
],
89
"repository": "https://github.com/prazdevs/pinia-plugin-persistedstate.git",
@@ -11,11 +12,18 @@
1112
"main": "dist/index.js",
1213
"module": "dist/index.mjs",
1314
"types": "dist/index.d.ts",
15+
"exports": {
16+
".": {
17+
"import": "./dist/index.mjs",
18+
"require": "./dist/index.js",
19+
"types": "./dist/index.d.ts"
20+
}
21+
},
1422
"files": [
1523
"dist"
1624
],
1725
"scripts": {
18-
"build": "rimraf dist && tsup src/index.ts --dts --format cjs,esm",
26+
"build": "rimraf dist && tsup",
1927
"coverage": "vue-demi-switch 3 && vitest --run --coverage",
2028
"lint": "eslint --ext .ts .",
2129
"lint:fix": "eslint --ext .ts --fix .",

tsup.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from 'tsup'
2+
3+
export default defineConfig({
4+
entry: ['src/index.ts', 'src/nuxt.ts'],
5+
dts: true,
6+
format: ['cjs', 'esm'],
7+
})

0 commit comments

Comments
 (0)