Skip to content

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

@jihu

Description

@jihu

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions