Skip to content

Commit

Permalink
feat(project): remove index file
Browse files Browse the repository at this point in the history
BREAKING CHANGE: we don't need this index file
  • Loading branch information
MrWook committed Oct 4, 2024
1 parent cc5f350 commit 818dd92
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 15 deletions.
26 changes: 17 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
{
"name": "@zxcvbn-ts/dictionary-compression",
"version": "4.0.0-beta.2",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"type": "commonjs",
"exports": {
".": {
"./compress": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
"types": "./dist/compress.d.mts",
"default": "./dist/compress.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.cjs"
"types": "./dist/compress.d.ts",
"default": "./dist/compress.cjs"
},
"default": "./dist/index.cjs"
"default": "./dist/compress.cjs"
},
"./decompress": {
"import": {
"types": "./dist/decompress.d.mts",
"default": "./dist/decompress.mjs"
},
"require": {
"types": "./dist/decompress.d.ts",
"default": "./dist/decompress.cjs"
},
"default": "./dist/decompress.cjs"
}
},
"scripts": {
Expand Down
4 changes: 0 additions & 4 deletions src/index.ts

This file was deleted.

7 changes: 5 additions & 2 deletions tsup.config.js → tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
export default {
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['src/**/*.ts'],
format: ["esm", "cjs"],
dts: true,
bundle: false,
sourcemap: true,
clean: true,
outExtension({ format }) {
const extension = format === 'esm' ? '.mjs' : '.cjs'
return {
js: `${extension}`,
}
},
};
})

0 comments on commit 818dd92

Please sign in to comment.