Skip to content

Commit

Permalink
fix(js): use valid file paths on Windows when executing program (#16911)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo authored May 10, 2023
1 parent c9d73d2 commit 20f25bf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
const Module = require('module');
const url = require('url');
const originalLoader = Module._load;

const dynamicImport = new Function('specifier', 'return import(specifier)');

const mappings = JSON.parse(process.env.NX_MAPPINGS);
const keys = Object.keys(mappings);
const fileToRun = process.env.NX_FILE_TO_RUN;
const fileToRun = url.pathToFileURL(process.env.NX_FILE_TO_RUN);

Module._load = function (request, parent) {
if (!parent) return originalLoader.apply(this, arguments);
Expand Down

1 comment on commit 20f25bf

@vercel
Copy link

@vercel vercel bot commented on 20f25bf May 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx.dev
nx-dev-git-master-nrwl.vercel.app

Please sign in to comment.