Skip to content

Commit

Permalink
fix(extension-emoji): don't use .cjs in the svgmoji wrapper (#1887)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocavue committed Sep 28, 2022
1 parent 67eb0ed commit 6d2066e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/wicked-schools-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@remirror/extension-emoji': patch
---

Workarounds the import error for `@remirror/extension-emoji` when using `react-scripts start` by not using `.cjs` file extension.
3 changes: 2 additions & 1 deletion packages/remirror__core-helpers/src/default-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ export function defaultImport<T>(mod: T): T {
: mod;

if (
defaultVal &&
typeof mod === 'object' &&
'__esModule' in defaultVal &&
// eslint-disable-next-line @typescript-eslint/naming-convention
(defaultVal as any).__esModule &&
(defaultVal as any).default !== undefined
) {
Expand Down
2 changes: 1 addition & 1 deletion packages/remirror__extension-emoji/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"dependencies": {
"@babel/runtime": "^7.13.10",
"@ocavue/svgmoji-cjs": "^0.1.0",
"@ocavue/svgmoji-cjs": "^0.1.1",
"@remirror/core": "^2.0.4",
"@remirror/messages": "^2.0.1",
"@remirror/theme": "^2.0.0",
Expand Down
21 changes: 16 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit 6d2066e

@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://63341da4fa30c57868be03eb--remirror.netlify.app

Please sign in to comment.