Open
Description
Failing module
- GitHub: https://github.com/ruilisi/fortune-sheet
- npm: @fortune-sheet/react
let { Workbook } = await import(
"https://esm.sh/@fortune-sheet/react?deps=react@18,react-dom@18"
);
let root = document.createElement("div");
ReactDOM.render(
React.createElement(Workbook, { data: [{ name: "Sheet1" }] }),
root
);
Error message
After onload
I got this:
TypeError: (intermediate value).values is not a function
Additional info
- Browser info: firefox
So the issue is the following, module imports https://esm.sh/v135/[email protected]/es2022/lodash.mjs
which conditionally checks if Window is defined, if it is, instead of exporting Loadsh, it exports an empty object, and writes _ on "window". Of course since esm.sh rewrites _ into R, R becomes an object, so it attempts to call R.values, which is not a function..