Skip to content

Conversation

@glebedel
Copy link
Contributor

@glebedel glebedel commented Mar 28, 2023

Reachdesk is getting this error:

ERROR in ./node_modules/@stackone/react-hub/dist/index.esm.js 126:32
Module parse failed: Unexpected token (126:32)
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|     "open" !== r && "closed" !== r && (a ? "opening" === r && n("closed") : s || "opening" === r && o && (n("open"), Connect.start(_objectSpread(_objectSpread({}, o), {}, {
|       onClose: () => {
>         n("closed"), o.onCancel?.();
|       }
|     }))));

This is because of the tsconfig target building for ESNext which supports features like optional chaining and type coalescence.
We could go lower than ES2018 (eg: to ES2016) if we think there's a risk T2s use non-ES2018 compatible browsers.

Also removing the dist folder as it shouldn't be needed (and removing it from .releaserc git plugin config should prevent it from being committed again)

@glebedel glebedel changed the title build: update tsconfic target and remove dist folder from git repo build: update tsconfig target and remove dist folder from git repo Mar 28, 2023
@glebedel glebedel requested review from Colex and jrebocho March 28, 2023 22:11
@glebedel glebedel merged commit 7b25db8 into StackOneHQ:main Mar 29, 2023
github-actions bot pushed a commit that referenced this pull request Mar 29, 2023
## [1.0.11](v1.0.10...v1.0.11) (2023-03-29)

### Bug Fixes

* update tsconfig target and remove dist folder from git repo ([#8](#8)) ([7b25db8](7b25db8))
@github-actions
Copy link

🎉 This PR is included in version 1.0.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants