I'm using this plugin to inject process.env in a Svelte Web Component, which is later imported on a Create React App project.
When building on Create React App we get this error:
Failed to minify the code from this file:
../my-package/dist/my-package.0.1.0.js:8:8
Which points to this line in the injected code:
process.env = Object.assign({}, process.env);
I'm not sure what's causing the minification error there but it looks like this plugin's output is not transpiled by @rollup/plugin-babel into ES5 (I'm guessing due to these lines).
I'm using this plugin to inject
process.env
in a Svelte Web Component, which is later imported on a Create React App project.When building on Create React App we get this error:
Which points to this line in the injected code:
I'm not sure what's causing the minification error there but it looks like this plugin's output is not transpiled by
@rollup/plugin-babel
into ES5 (I'm guessing due to these lines).Any way to fix this?