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

Add .js extension for artifacts import (ESM compatability) #5040

Open
4 tasks
gilgardosh opened this issue Jan 16, 2023 · 1 comment
Open
4 tasks

Add .js extension for artifacts import (ESM compatability) #5040

gilgardosh opened this issue Jan 16, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@gilgardosh
Copy link
Collaborator

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

Make sure to fork this template and run yarn generate in the terminal.

Please make sure Mesh package versions under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

Bundling a package with Mesh artifacts as ESM results in error, since the hardcoded paths in the artifacts are missing .js extension

To Reproduce Steps to reproduce the behavior:

  1. Create a basic Mesh example with local sources (e.g the json-schema-example)
  2. Generate artifact
  3. Create ESM bundle
  4. Try to run the bundled artifact

Expected behavior

Bundled artifacts should fully support ESM

@gilgardosh gilgardosh added the bug Something isn't working label Jan 16, 2023
@gilgardosh gilgardosh mentioned this issue Jan 16, 2023
3 tasks
@gilgardosh
Copy link
Collaborator Author

ESM is currently supported. with the NODE_OPTIONS=\"--loader ts-node/esm\" mesh build command.
@ardatan can we maybe migrate this var to the configuration file?

This was referenced Apr 30, 2024
This was referenced May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant