Skip to content
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

Safari doesn't work when using the default export and only works when using the rollup export #25

Open
2 tasks done
lucsoft opened this issue Feb 16, 2024 · 1 comment

Comments

@lucsoft
Copy link

lucsoft commented Feb 16, 2024

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure it has not already been reported

Version (i.e. v2.x.x)

1.0.1-alpha.199

Node.js version (i.e. 18.x, or N/A)

v21.5.0

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10, or N/A)

14.3

Description

Im bundling this polyfill via webpack.

Problem i found using @virtualstate/navigation/polyfill/rollup as an entrypoint and importing that works under Safari
But @virtualstate/navigation/polyfill doesn not.

This only effects Safari after a reload (When its using its Cache, disabling the Cache works)

Steps to Reproduce

(coming soon)

Expected Behavior

No response

@fabiancook
Copy link
Contributor

fabiancook commented Feb 17, 2024

Since you're using webpack, I would imagine it would be leaning towards needing a commonjs compatible module, which /polyfill/rollup is.

I've added the mapping for commonjs for just /polyfill to automatically pick between esm and cjs, let me know if this does the trick. Version 1.0.1-alpha.200 is publishing now with this change.

Let me know if this does the trick or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants