Merge pull request #5610 from nextcloud-libraries/fix/next-esm-only
[next] refactor!: Drop CJS entry points, only provide ESM
This commit is contained in:
Коммит
61048fa798
19
package.json
19
package.json
|
@ -31,37 +31,30 @@
|
|||
"cypress:gui": "TZ=UTC cypress open --component",
|
||||
"cypress:update-snapshots": "TZ=UTC cypress run --component --spec \"cypress/visual/**/*.cy.{t,j}s\" --env type=base --config screenshotsFolder=cypress/snapshots/base"
|
||||
},
|
||||
"main": "dist/index.cjs",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.cjs"
|
||||
"import": "./dist/index.mjs"
|
||||
},
|
||||
"./dist/Components/*.js": {
|
||||
"types": "./dist/components/*/index.d.ts",
|
||||
"import": "./dist/Components/*.mjs",
|
||||
"require": "./dist/Components/*.cjs"
|
||||
"import": "./dist/Components/*.mjs"
|
||||
},
|
||||
"./dist/Directives/*.js": {
|
||||
"types": "./dist/directives/*/index.d.ts",
|
||||
"import": "./dist/Directives/*.mjs",
|
||||
"require": "./dist/Directives/*.cjs"
|
||||
"import": "./dist/Directives/*.mjs"
|
||||
},
|
||||
"./dist/Functions/*.js": {
|
||||
"types": "./dist/functions/*/index.d.ts",
|
||||
"import": "./dist/Functions/*.mjs",
|
||||
"require": "./dist/Functions/*.cjs"
|
||||
"import": "./dist/Functions/*.mjs"
|
||||
},
|
||||
"./dist/Mixins/*.js": {
|
||||
"types": "./dist/mixins/*/index.d.ts",
|
||||
"import": "./dist/Mixins/*.mjs",
|
||||
"require": "./dist/Mixins/*.cjs"
|
||||
"import": "./dist/Mixins/*.mjs"
|
||||
},
|
||||
"./dist/Composables/*.js": {
|
||||
"types": "./dist/composables/*/index.d.ts",
|
||||
"import": "./dist/Composables/*.mjs",
|
||||
"require": "./dist/Composables/*.cjs"
|
||||
"import": "./dist/Composables/*.mjs"
|
||||
}
|
||||
},
|
||||
"files": [
|
||||
|
|
|
@ -112,8 +112,8 @@ export default defineConfig((env) => {
|
|||
},
|
||||
// For backwards compatibility we include the css within the js files
|
||||
inlineCSS: true,
|
||||
// Build CommonJS files for backwards compatibility
|
||||
libraryFormats: ['cjs', 'es'],
|
||||
// Only standard ESM
|
||||
libraryFormats: ['es'],
|
||||
replace: {
|
||||
PRODUCTION: JSON.stringify(env.mode === 'production'),
|
||||
SCOPE_VERSION,
|
||||
|
|
Загрузка…
Ссылка в новой задаче