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

Import package.json directly instead of needing a global #984

Open
zepumph opened this issue Oct 15, 2024 · 1 comment
Open

Import package.json directly instead of needing a global #984

zepumph opened this issue Oct 15, 2024 · 1 comment

Comments

@zepumph
Copy link
Member

zepumph commented Oct 15, 2024

In phetsims/chipper#1491, we see that typescript can import json directly with a few settings. We may prioritize supporting this in NodeJS for now, but it would be so amazing if sims could import a packageJSON as JSON instead of needing a global.

I believe we could accomplish it with dynamic imports that wire into asyncLoader for simLauncher, but I'm unsure how many usages of JOIST/packageJSON are used statically. @samreid is also concerned about how this behavior may differ between build and unbuilt mode.

We are not going to prioritize this anytime soon. @jonathanolson FYI because I know you were part of the packageObject global workaround to get es6 modules working.

@jonathanolson
Copy link
Contributor

Sounds tricky to handle with built/unbuilt modes. Guess it depends on how much "build" we want to put into the transpiler.

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