Closed hakonbjork1 closed 2 weeks ago
Hi, thanks for flagging this. Sorry to hear that the SDK isn't working with this Babel plugin.
There are a number of issues with the build of the current SDK package, the main one being that we're only outputting CommonJS, and using a fairly basic ESBuild configuration for the compilation.
We are currently working on an overhaul of the SDK which will split the various components into standalone packages built as both ES Modules and CommonJS for Node. We're aiming to have this ready in the next few days.
When using Create React App, their docs seem to suggest ES Modules are preferred, so hopefully this will solve your use case. Happy to keep this issue open until it's resolved.
Hi @hakonbjork1 . Just wanted to follow up and let you know that the new batch and real-time packages are now available on NPM:
https://www.npmjs.com/package/@speechmatics/batch-client https://www.npmjs.com/package/@speechmatics/real-time-client
Both these packages export ESM and CJS, so it should integrate better with your babel plugin. I'm going to close this issue, but feel free to reopen or make a new issue if you encounter any further problems.
Hi! Thanks for dealing with this and letting me know🙌
Describe the bug When using speechmatics together with packages depending on
@babel/plugin-transform-parameters
, the project fails to compile and build because of the following SyntaxError:When using Create React App, this happens right after installing speechmatics and attempting to build.
To Reproduce Steps to reproduce the behavior:
npx create-react-app my-app
npm install speechmatics
index.js
:import "speechmatics"
npm run build
Expected behavior A project using speechmatics and packages depending on
@babel/plugin-transform-parameters
should be able to build without problem.Screenshots Screenshot of the error:
Desktop (please complete the following information):