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

Issue with bundling with Webpack: "package is a reserved identifier" #44

Closed
trentfridey opened this issue Jun 13, 2023 · 5 comments
Closed

Comments

@trentfridey
Copy link
Contributor

Hi, I am using empack to pack a Python environment and serve it in the browser, by serving the pyjs runtime (and the rest of my app code) with Webpack.

Webpack is having an issue with the use of package in include/pyjs/pre_js/load_pkg.js1 since it is a future reserved word in Javascript:

image

I tried using a babel plugin that transforms reserved words but it gave me an error that I had difficulty debugging it since the pyjs_runtime_browser.js code is a large file.

It seems more efficient to do a find+replace (i.e. replace package with pkg or similar) for the few spots it is used. I have a fork with the patch if you would like to merge it.

Footnotes

  1. fetchAndUntar and the function beneath

@DerThorsten
Copy link
Collaborator

feel free to open a PR!

@trentfridey
Copy link
Contributor Author

I will try to do so this week

@DerThorsten
Copy link
Collaborator

thanks for reporting this!

@trentfridey
Copy link
Contributor Author

Ok fix is in #50

@DerThorsten
Copy link
Collaborator

thanks and sorry for the long delay

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