Skip to content

Commit

Permalink
Merge pull request #1051 from ecomfe/module_default_esm
Browse files Browse the repository at this point in the history
feat: change to default ESM package. For developer testing and node usage in customization module scenario.
  • Loading branch information
Ovilia authored Jan 22, 2024
2 parents d53f1c8 + 565dac5 commit dbf1bd5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
3 changes: 3 additions & 0 deletions build/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "commonjs"
}
3 changes: 3 additions & 0 deletions dist/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "commonjs"
}
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,17 @@
"ts-jest": "^27.0.6",
"typescript": "^4.4.3",
"uglify-js": "^3.10.0"
},
"type": "module",
"exports": {
".": {
"types": "./index.d.ts",
"require": "./dist/zrender.js",
"import": "./index.js"
},
"./*.js": "./*.js",
"./*.ts": "./*.ts",
"./*.json": "./*.json",
"./*": "./*.js"
}
}
}
2 changes: 1 addition & 1 deletion src/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rules:
- "warn"
- "error"
no-constant-condition: 0
comma-dangle: 2
comma-dangle: 0
no-debugger: 2
no-dupe-keys: 2
no-empty-character-class: 2
Expand Down
3 changes: 3 additions & 0 deletions test/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "commonjs"
}

0 comments on commit dbf1bd5

Please sign in to comment.