Skip to content

Commit 4fca5b3

Browse files
committed
Migrate to ESM-only
1 parent 480f3a9 commit 4fca5b3

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

packages/react-clock/package.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,16 @@
66
"sideEffects": [
77
"*.css"
88
],
9-
"main": "./dist/cjs/index.js",
10-
"module": "./dist/esm/index.js",
9+
"main": "./dist/index.js",
1110
"source": "./src/index.ts",
12-
"types": "./dist/cjs/index.d.ts",
11+
"types": "./dist/index.d.ts",
1312
"exports": {
14-
".": {
15-
"import": "./dist/esm/index.js",
16-
"require": "./dist/cjs/index.js"
17-
},
13+
".": "./dist/index.js",
1814
"./*": "./*"
1915
},
2016
"scripts": {
2117
"build": "yarn build-js && yarn copy-styles",
22-
"build-js": "yarn build-js-esm && yarn build-js-cjs && yarn build-js-cjs-package",
23-
"build-js-esm": "tsc --project tsconfig.build.json --outDir dist/esm",
24-
"build-js-cjs": "tsc --project tsconfig.build.json --outDir dist/cjs --module commonjs --moduleResolution node --verbatimModuleSyntax false",
25-
"build-js-cjs-package": "echo '{\n \"type\": \"commonjs\"\n}' > dist/cjs/package.json",
18+
"build-js": "tsc --project tsconfig.build.json",
2619
"clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true })\"",
2720
"copy-styles": "cpy 'src/**/*.css' dist",
2821
"format": "biome format",
@@ -31,7 +24,7 @@
3124
"test": "yarn lint && yarn tsc && yarn format && yarn unit",
3225
"tsc": "tsc",
3326
"unit": "vitest",
34-
"watch": "yarn build-js-esm --watch & yarn build-js-cjs --watch & node --eval \"fs.watch('src', () => child_process.exec('yarn copy-styles'))\""
27+
"watch": "yarn build-js --watch & node --eval \"fs.watch('src', () => child_process.exec('yarn copy-styles'))\""
3528
},
3629
"keywords": [
3730
"clock",

0 commit comments

Comments
 (0)