Skip to content

Commit 85fc2a3

Browse files
authored
Merge pull request #513 from nextcloud/fix/es-modul
2 parents 8c5d2ba + ecb7495 commit 85fc2a3

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
"name": "@nextcloud/initial-state",
33
"version": "2.0.0",
44
"description": "Access data from the nextcloud server-side initial state API within apps.",
5-
"main": "dist/index.js",
6-
"module": "dist/index.esm.js",
5+
"type": "module",
6+
"main": "dist/index.cjs",
77
"types": "dist/index.d.ts",
88
"exports": {
9-
"import": "./dist/index.esm.js",
10-
"require": "./dist/index.js"
9+
"import": "./dist/index.es.mjs",
10+
"require": "./dist/index.cjs",
11+
"types": "./dist/index.d.ts"
1112
},
1213
"files": [
1314
"dist/"

rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default [
1111
],
1212
output: [
1313
{
14-
dir: 'dist',
14+
file: 'dist/index.cjs',
1515
format: 'cjs',
1616
sourcemap: true,
1717
},
@@ -22,7 +22,7 @@ export default [
2222
plugins: [typescript()],
2323
output: [
2424
{
25-
file: 'dist/index.esm.js',
25+
file: 'dist/index.es.mjs',
2626
format: 'esm',
2727
sourcemap: true,
2828
},

0 commit comments

Comments
 (0)