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

proper es module #452

Open
felixroos opened this issue Apr 18, 2022 · 2 comments
Open

proper es module #452

felixroos opened this issue Apr 18, 2022 · 2 comments

Comments

@felixroos
Copy link

It would be great if this could be packaged as a proper es module. I could not use this package with snowpack, also, it won't work with skypack. For example, the following html:

<script type="module">
  import { parseScriptWithLocation } from 'https://cdn.skypack.dev/shift-parser';
</script>

will produce the following error

shift-parser.js:4857 Uncaught TypeError: Super expression must either be null or a function, not undefined
    at _inherits (shift-parser.js:4857:13)
    at shift-parser.js:4931:5
    at shift-parser.js:5690:4
    at createCommonjsModule (shift-parser.js:15:6)
    at shift-parser.js:4785:19

Generally, I wonder if shift is still maintained?

@bakkot
Copy link
Member

bakkot commented Apr 18, 2022

It is still maintained, though I'm behind at the moment.

I'll think about publishing an ES module. The state of ESM was kind of chaotic last I checked but there's probably a reasonable solution.

@felixroos
Copy link
Author

that would be great! I could also try it myself and send a PR if you want

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