You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using @huridocs/react-text-selection-handler via a regular import statement like import { HandleTextSelection } from '@huridocs/react-text-selection-handler'
will throw an error:
/node_modules/@huridocs/react-text-selection-handler/dist/index.js:1
export { Highlight } from './Highlight';
^^^^^^
SyntaxError: Unexpected token 'export'
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1153:20)
at Module._compile (node:internal/modules/cjs/loader:1205:27)
at Module._compile (node_modules/pirates/lib/index.js:117:24)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Object.newLoader [as .js] (/node_modules/pirates/lib/index.js:121:7)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object.<anonymous> ({path to component})
A way to circumvent this problem is to make the component importing this library a loadable component. We did not detect this problem in the past because the only place we used this library was on a components that already are loadable components.
I suspect it could be related to some conflict arising from package configurations like #6313. It could also be an issue with how we compile react-text-selection-handler when building the release, but it looks normal.
We can skip this issue for now with loadable but it's a red flag that this is happening.
The text was updated successfully, but these errors were encountered:
Using
@huridocs/react-text-selection-handler
via a regular import statement likeimport { HandleTextSelection } from '@huridocs/react-text-selection-handler'
will throw an error:
A way to circumvent this problem is to make the component importing this library a
loadable
component. We did not detect this problem in the past because the only place we used this library was on a components that already areloadable
components.I suspect it could be related to some conflict arising from package configurations like #6313. It could also be an issue with how we compile
react-text-selection-handler
when building the release, but it looks normal.We can skip this issue for now with
loadable
but it's a red flag that this is happening.The text was updated successfully, but these errors were encountered: