filestack-js
filestack-js copied to clipboard
Mixing 'import' and 'require' causing issues with rollup
Expected behavior
The project builds without issue.
Actual behavior
Throws error:
ReferenceError: require is not defined at http://localhost:8080/_snowpack/pkg/filestack-js.v3.23.1.js:5135:22
Possible Solution
Snowpack developer: Usually this happens when a package tells us that it's ESM but it then still contains CJS require() calls. If a package tells us it's ESM we'll trust it, but in some cases that's not true.
Steps to Reproduce (for bugs)
Create a project with snowpack and typescript and attempt to build.
Additional Screenshots
Context
use filestack in a project with snowpack and ts
Your Environment
filestack.js "version": "3.23.1", browser: chrome macos desktop