Skip to content

Commit

Permalink
fix(jest-remirror): add default filed in the package.json (#1547)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocavue committed Mar 6, 2022
1 parent a8f0b0e commit 5d7a90f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/unlucky-waves-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'jest-remirror': patch
---

Add `default` filed in the `package.json`.
6 changes: 4 additions & 2 deletions packages/jest-remirror/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
"exports": {
".": {
"require": "./dist/jest-remirror.cjs.js",
"types": "./dist/jest-remirror.cjs.d.ts"
"types": "./dist/jest-remirror.cjs.d.ts",
"default": "./dist/jest-remirror.cjs.js"
},
"./environment": {
"require": "./environment/dist/jest-remirror-environment.cjs.js",
"types": "./environment/dist/jest-remirror-environment.cjs.d.ts"
"types": "./environment/dist/jest-remirror-environment.cjs.d.ts",
"default": "./environment/dist/jest-remirror-environment.cjs.js"
},
"./package.json": "./package.json",
"./types/*": "./dist/declarations/src/*.d.ts"
Expand Down
6 changes: 4 additions & 2 deletions packages/remirror__cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
"exports": {
".": {
"require": "./dist/remirror-cli.cjs.js",
"types": "./dist/remirror-cli.cjs.d.ts"
"types": "./dist/remirror-cli.cjs.d.ts",
"default": "./dist/remirror-cli.cjs.js"
},
"./cli": {
"require": "./cli/dist/remirror-cli-cli.cjs.js"
"require": "./cli/dist/remirror-cli-cli.cjs.js",
"default": "./cli/dist/remirror-cli-cli.cjs.js"
},
"./package.json": "./package.json",
"./types/*": "./dist/declarations/src/*.d.ts"
Expand Down
6 changes: 4 additions & 2 deletions packages/storybook-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
},
"exports": {
".": {
"require": "./dist/storybook-react.cjs.js"
"require": "./dist/storybook-react.cjs.js",
"default": "./dist/storybook-react.cjs.js"
},
"./package.json": "./package.json",
"./storybook-react-main": {
"require": "./storybook-react-main/dist/storybook-react-storybook-react-main.cjs.js"
"require": "./storybook-react-main/dist/storybook-react-storybook-react-main.cjs.js",
"default": "./storybook-react-main/dist/storybook-react-storybook-react-main.cjs.js"
},
"./types/*": "./dist/declarations/src/*.d.ts"
},
Expand Down
2 changes: 1 addition & 1 deletion support/scripts/src/generate-configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function augmentExportsObject(rootJson: PackageJson, filepath: string, subJson:
// Experimental since this is not currently resolved by TypeScript.
types: prefixRelativePath(subJson.types ? path.join(filepath, subJson.types) : undefined),
};
field.default = field.import;
field.default = field.import || field.require;

let exportsObject: Exports;

Expand Down

1 comment on commit 5d7a90f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://remirror.io as production
🚀 Deployed on https://622492184d5d6d9fb7eca36d--remirror.netlify.app

Please sign in to comment.