Make Omorphia an ESM-only module (#115)

This commit is contained in:
Sasha Sorokin 2023-11-11 22:22:00 +01:00 committed by GitHub
parent fd82ec7659
commit 9c3ff71ce4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -5,13 +5,11 @@
"files": [ "files": [
"dist" "dist"
], ],
"main": "./dist/omorphia.umd.cjs",
"module": "./dist/omorphia.js", "module": "./dist/omorphia.js",
"exports": { "exports": {
".": { ".": {
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
"import": "./dist/omorphia.js", "import": "./dist/omorphia.js"
"require": "./dist/omorphia.cjs"
}, },
"./dist/style.css": "./dist/style.css" "./dist/style.css": "./dist/style.css"
}, },

View File

@ -13,7 +13,7 @@ export default defineConfig({
entry: resolve(__dirname, 'lib/index.ts'), entry: resolve(__dirname, 'lib/index.ts'),
name: 'Omorphia', name: 'Omorphia',
fileName: 'omorphia', fileName: 'omorphia',
formats: ['es', 'cjs'], formats: ['es'],
}, },
}, },
plugins: [ plugins: [