Skip to content

Commit

Permalink
build: add iife and convert to type module
Browse files Browse the repository at this point in the history
  • Loading branch information
wobsoriano committed Dec 3, 2023
1 parent 8949d60 commit b4f3699
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
26 changes: 21 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 1,36 @@
{
"name": "pinia-shared-state",
"type": "module",
"version": "0.4.5",
"packageManager": "[email protected]",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/wobsoriano/pinia-shared-state.git"
},
"sideEffects": false,
"exports": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
".": {
"types": {
"require": "./dist/index.d.cts",
"import": "./dist/index.d.ts"
},
"require": "./dist/index.cjs",
"import": "./dist/index.js"
}
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"unpkg": "dist/index.global.js",
"jsdelivr": "dist/index.global.js",
"types": "./dist/index.d.ts",
"typesVersions": {
"*": {
"*": [
"./dist/*"
]
}
},
"files": [
"dist"
],
Expand Down
7 changes: 4 additions & 3 deletions tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 2,10 @@ import { defineConfig } from 'tsup';

export default defineConfig({
entry: ['src/index.ts'],
format: ['cjs', 'esm'],
splitting: false,
sourcemap: true,
clean: true,
minify: true,
format: ['cjs', 'esm', 'iife'],
globalName: 'PiniaSharedState',
dts: true,
external: ['vue-demi'],
});

0 comments on commit b4f3699

Please sign in to comment.