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

Trigger module-alias/register when running single js-file code in Visual Studio Code? #138

Open
jihu opened this issue Nov 2, 2023 · 0 comments

Comments

@jihu
Copy link

jihu commented Nov 2, 2023

Hi,

I have gotten this feature to work when running in node the normal way. But I also want to get it to work when I run a single js-file in Visual Studio Code (using the Run Code feature, Ctr+Alt+N). It works if I put require('module-alias/register') at the top of the file, but I would prefer to not have to do this in every single js file just to make VS Code happy.

Is there a way to configure VS Code to run require('module-alias/register') automatically for me, by specifying something in the jsconfig.json file for example?

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

1 participant