Skip to content

Commit 3b7290d

Browse files
committed
chore!: remove commonjs entry point
We dropped the CJS entry point in all new libraries (e.g. compare nextcloud-vue or e.g. initial-state), so we can also do here with v4. This will make building a bit easier and reduce bundle size. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 0286c52 commit 3b7290d

2 files changed

Lines changed: 2 additions & 15 deletions

File tree

package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,13 @@
2121
"exports": {
2222
".": {
2323
"types": "./dist/index.d.ts",
24-
"import": "./dist/index.mjs",
25-
"require": "./dist/index.cjs"
24+
"import": "./dist/index.mjs"
2625
},
2726
"./dav": {
2827
"types": "./dist/dav/index.d.ts",
29-
"import": "./dist/dav.mjs",
30-
"require": "./dist/dav.cjs"
28+
"import": "./dist/dav.mjs"
3129
}
3230
},
33-
"main": "dist/index.cjs",
34-
"module": "dist/index.mjs",
35-
"types": "dist/index.d.ts",
3631
"files": [
3732
"dist"
3833
],
@@ -73,7 +68,6 @@
7368
"@nextcloud/vite-config": "^2.5.2",
7469
"@types/node": "^25.0.0",
7570
"@vitest/coverage-istanbul": "^4.0.15",
76-
"css.escape": "^1.5.1",
7771
"fast-xml-parser": "^5.3.2",
7872
"jsdom": "^27.3.0",
7973
"tslib": "^2.8.1",

vite.config.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@ export default createLibConfig({
99
index: 'lib/index.ts',
1010
dav: 'lib/dav/index.ts',
1111
}, {
12-
libraryFormats: ['cjs', 'es'],
13-
14-
nodeExternalsOptions: {
15-
// Force bundle pure ESM module
16-
exclude: ['is-svg'],
17-
},
18-
1912
config: {
2013
plugins: [
2114
// Put the Codecov vite plugin after all other plugins

0 commit comments

Comments
 (0)