Skip to content

Commit

Permalink
chore: use cjs and esm export
Browse files Browse the repository at this point in the history
  • Loading branch information
arturosdg committed Oct 16, 2024
1 parent 6a90714 commit abe2404
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 150 deletions.
187 changes: 39 additions & 148 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
".": "./dist/index.js",
"./integration": "./dist/integration.js"
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
Expand Down Expand Up @@ -47,7 +48,7 @@
},
"homepage": "https://github.com/mercadona/wrapito-vitest#readme",
"dependencies": {
"chalk": "^5.3.0",
"chalk": "^4.1.2",
"deep-equal": "^2.2.3",
"jest-diff": "^29.7.0",
"object-hash": "^3.0.0",
Expand Down
5 changes: 4 additions & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ export default defineConfig(options => ({
integration: './src/integration.ts',
},
outDir: 'dist',
format: ['esm'],
format: ['cjs', 'esm'],
tsconfig: './tsconfig.json',
clean: true,
dts: true,
minify: !options?.watch,
outExtension: ({ format }) => ({
js: format === 'cjs' ? '.js' : '.mjs',
}),
}))

0 comments on commit abe2404

Please sign in to comment.