Skip to content

Commit

Permalink
improve exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Freezystem committed Dec 15, 2023
1 parent 9196d24 commit 51dc7d3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
18 changes: 11 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@
"bars",
"email"
],
"main": "./build/index.js",
"type": "module",
"main": "./build/umd/index.js",
"module": "./build/esm/index.js",
"types": "./build/types/index.d.ts",
"exports": {
".": {
"types": "./build/types/index.d.ts",
"require": "./build/index.js",
"import": "./build/esm/index.js",
"default": "./src/index.ts"
}
"node": {
"require": "./build/umd/index.js",
"import": "./build/esm/index.js"
},
"types": "./build/types/index.d.ts",
"require": "./build/umd/index.js",
"import": "./build/esm/index.js",
"browser": "./build/umd/index.js",
"default": "./build/umd/index.js"
},
"files": [
"build/**/*",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"compilerOptions": {
"rootDir": "src",
"types": ["node", "jest", "mjml", "mjml-core", "mjml-validator"],
"outDir": "build",
"module": "commonjs",
"outDir": "build/umd",
"module": "umd",
"target": "ESNext",
"moduleResolution": "node",
"esModuleInterop": true,
Expand Down

0 comments on commit 51dc7d3

Please sign in to comment.