Skip to content

Fix NPM shim resolver on Firefox #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ New features:

Bugfixes:
- Fix `Reference Error: main is not defined` bug: (#288 by @JordanMartinez)
- Fix NPM dependency shims on Firefox 100+ (#289 by @JordanMartinez)

Other improvements:
- Update `es-module-shims` to 1.5.9 (#289 by @JordanMartinez)

## [v2022-07-15.1](https://github.com/purescript/trypurescript/releases/tag/v2022-07-15.1)

Expand Down
15 changes: 8 additions & 7 deletions client/public/frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,31 @@
</script>
<!--
JSPM Generator Import Map
Edit URL: https://generator.jspm.io/#Y2NnYGCzD80rySzJSU1hSMpM183MK0lNTy1yMNQz0zM1ZEhJTc7MTczRyyp2MDTQM9YzZChKTUwu0U3Jz3UwNNMzxCqiX5xaVJZaBJGAKystzUxxsACaYQQAoBlP83cA
Edit URL: https://generator.jspm.io/#Y2VhYGCzD80rySzJSU1hSMpM183MK0lNTy1yMNQz0zM1ZEhJTc7MTczRyyp2MDTQM9YzZChKTUwu0U3Jz3UwNNMzxCqiX5xaVJZaBJGAKystzUxxsACaYQQAQSdSGncA
-->
<script type="importmap">
{
"imports": {
"big-integer": "https://ga.jspm.io/npm:[email protected]/BigInteger.js",
"decimal.js": "https://ga.jspm.io/npm:[email protected]/decimal.js",
"react": "https://ga.jspm.io/npm:[email protected]/index.js",
"react-dom": "https://ga.jspm.io/npm:[email protected]/index.js",
"react-dom/server": "https://ga.jspm.io/npm:[email protected]/server.browser.js",
"react": "https://ga.jspm.io/npm:[email protected]/dev.index.js",
"react-dom": "https://ga.jspm.io/npm:[email protected]/dev.index.js",
"react-dom/server": "https://ga.jspm.io/npm:[email protected]/dev.server.browser.js",
Copy link
Contributor

@pete-murphy pete-murphy Jul 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, does bumping the version also fix this? I would think this might need to be in sync with the purescript-react purescript-react-basic libraries which were recently updated to 18 (I'm actually surprised that createRoot is in the dev version of 16.13.1).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you're right. Bumping the React version to 17.0.2, the last release before 18, makes it work.

"uuid": "https://ga.jspm.io/npm:[email protected]/dist/esm-browser/index.js"
},
"scopes": {
"https://ga.jspm.io/": {
"object-assign": "https://ga.jspm.io/npm:[email protected]/index.js",
"react": "https://ga.jspm.io/npm:[email protected]/index.js",
"scheduler": "https://ga.jspm.io/npm:[email protected]/index.js"
"prop-types/checkPropTypes": "https://ga.jspm.io/npm:[email protected]/dev.checkPropTypes.js",
"scheduler": "https://ga.jspm.io/npm:[email protected]/dev.index.js",
"scheduler/tracing": "https://ga.jspm.io/npm:[email protected]/dev.tracing.js"
}
}
}
</script>

<!-- ES Module Shims: Import maps polyfill for modules browsers without import maps support (all except Chrome 89+) -->
<script async src="https://ga.jspm.io/npm:[email protected].6/dist/es-module-shims.js" integrity="sha384-Zi3OSEiS8YnN0yIdnkInyBlzXCGA18AMnQuPb+T1hXvE4DIDhGIp2QIBZcm4WNIU" crossorigin="anonymous"></script>
<script async src="https://ga.jspm.io/npm:[email protected].9/dist/es-module-shims.js" integrity="sha384-O6YhhDNmwzHXz9VDaEaEtY9rnzCF5Fy+yoxD6StrNyhjwyBrYYOjZkbFRt9zcoGx" crossorigin="anonymous"></script>

<script src="js/frame.js"></script>
</head>
Expand Down