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

fix issue #149 - add .js to esm modules #150

Closed
wants to merge 1 commit into from

Conversation

jogibear9988
Copy link

No description provided.

@jogibear9988
Copy link
Author

so the elements could be used in https://node-projects.github.io/web-component-designer-demo/index.html

@urish
Copy link
Collaborator

urish commented Feb 3, 2023

Thanks. Could the @node-projects/add-js-to-esm-modules be modified to produce less output? right now it's very chatty. Ideally it'd produce no output, or just a summary with the number of files/import statements modified and the run time.

Also, is it possible to add some unit tests to the source code of that module? To ensure that future version won't cause regressions that will possibly break the build of packages using it.

@jogibear9988
Copy link
Author

will do some tests and be less chatty 😉
but will do it next week.

@GervinFung
Copy link

Thanks. Could the @node-projects/add-js-to-esm-modules be modified to produce less output? right now it's very chatty. Ideally it'd produce no output, or just a summary with the number of files/import statements modified and the run time.

Also, is it possible to add some unit tests to the source code of that module? To ensure that future version won't cause regressions that will possibly break the build of packages using it.

Good evening @urish, how about giving ts-add-js-extension a try? The strength of this package is that, it can also find whether you are importing/exporting something.js or something/index.js, and it can find whether you are importing/exporting .js or .mjs, you just have to specify the outDir for this package to work. outDir needs user input, because

  1. There can be multiple tsconfig"something".json
  2. This tool will run independent of tsc

(Heck, it can also run on JavaScript project if developers are lazy to specify the file extension)

Try it, it should be of great help as it covers a lot of cases

@urish
Copy link
Collaborator

urish commented May 21, 2023

@GervinFung congrats on your projects! This is not really a priority for me now, but I'll keep it in mind.

@urish urish closed this May 2, 2024
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

Successfully merging this pull request may close these issues.

3 participants