Skip to content

Commit 557674b

Browse files
committed
[v2] breaking: drop "module" condition
1 parent 9101ee5 commit 557674b

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

package.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
"types": "./esm/index.d.mts",
3434
"default": "./esm/index.mjs"
3535
},
36-
"module": {
37-
"types": "./esm/index.d.ts",
38-
"default": "./esm/index.js"
39-
},
4036
"default": {
4137
"types": "./index.d.ts",
4238
"default": "./index.js"
@@ -47,10 +43,6 @@
4743
"types": "./esm/*.d.mts",
4844
"default": "./esm/*.mjs"
4945
},
50-
"module": {
51-
"types": "./esm/*.d.ts",
52-
"default": "./esm/*.js"
53-
},
5446
"default": {
5547
"types": "./*.d.ts",
5648
"default": "./*.js"
@@ -85,7 +77,7 @@
8577
"copy": "shx cp -r dist/src/* dist/esm && shx cp -r dist/src/* dist && shx rm -rf dist/{src,tests} && shx cp package.json readme.md LICENSE dist && json -I -f dist/package.json -e \"this.private=false; this.devDependencies=undefined; this.optionalDependencies=undefined; this.scripts=undefined; this.prettier=undefined;\"",
8678
"patch-macro-vite": "shx cp dist/esm/macro/vite.d.ts dist/macro/",
8779
"patch-old-ts": "shx touch dist/ts_version_4.5_and_above_is_required.d.ts",
88-
"patch-esm-ts": "node -e \"require('shelljs').find('dist/esm/**/*.d.ts').forEach(f=>{var f2=f.replace(/\\.ts$/,'.mts');require('fs').copyFileSync(f,f2);require('shelljs').sed('-i',/ from '(\\.[^']+)';$/,' from \\'\\$1.mjs\\';',f2);require('shelljs').sed('-i',/^declare module '(\\.[^']+)'/,'declare module \\'\\$1.mjs\\'',f2)})\""
80+
"patch-esm-ts": "node -e \"require('shelljs').find('dist/esm/**/*.d.ts').forEach(f=>{var f2=f.replace(/\\.ts$/,'.mts');require('fs').renameSync(f,f2);require('shelljs').sed('-i',/ from '(\\.[^']+)';$/,' from \\'\\$1.mjs\\';',f2);require('shelljs').sed('-i',/^declare module '(\\.[^']+)'/,'declare module \\'\\$1.mjs\\'',f2)})\""
8981
},
9082
"engines": {
9183
"node": ">=12.20.0"

rollup.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ module.exports = function (args) {
168168
return [
169169
...(c === 'index' ? [createDeclarationConfig(`src/${c}.ts`, 'dist')] : []),
170170
createCommonJSConfig(`src/${c}.ts`, `dist/${c}`),
171-
createESMConfig(`src/${c}.ts`, `dist/esm/${c}.js`),
172171
createESMConfig(`src/${c}.ts`, `dist/esm/${c}.mjs`),
173172
createUMDConfig(`src/${c}.ts`, `dist/umd/${c}`, 'development'),
174173
createUMDConfig(`src/${c}.ts`, `dist/umd/${c}`, 'production'),

0 commit comments

Comments
 (0)