Closed PsionicChic closed 8 months ago
looks like the issue is coming from lines like this:
https://github.com/Iterable/iterable-web-sdk/blob/main/src/inapp/utils.ts#L155
all the ??
code is probably going to have to be transpiled via a babel plugin: https://github.com/Iterable/iterable-web-sdk/blob/main/.babelrc#L12
We discovered that even upgrading to latest Webpack 4, Node 16, latest transpiler, and updating plugins wasn't enough to get this thing going. We started the project years ago with react-boilerplate. What worked for us was moving to Node 18 and Webpack 5.
@PsionicChic yep that makes sense. you probably also just could have kept with this approach, but did the same thing in your webpack.prod.babel.js
file as well, and it would have fixed the issue since you would have been transpiling in both dev and prod:
Included node-modules in webpack.base.babel.js for babel-loader specifically for iterable. This allowed it to compile locally, but not on the build server
Just now getting around to looking at this. Apologies for the late reply. It looks like you have since resolved so going to close the issue out.
Receiving an error while compiling when trying to access the iterable sdk after installation of the package.
Installation went smoothly, and environment builds locally successfully as long as we don't try to import from @iterable/web-sdk.
Things we've tried:
Error:
./node_modules/@iterable/web-sdk/index.js 2:35242Module parse failed: Unexpected token (2:35242)You may need an appropriate loader to handle this file type.
package.json:
webpack.base.babel.js