diff --git a/lib/bootstrap-local.js b/lib/bootstrap-local.js index f336b5183636..e658d3b02291 100644 --- a/lib/bootstrap-local.js +++ b/lib/bootstrap-local.js @@ -42,7 +42,7 @@ require.extensions['.ts'] = function(m, filename) { // }); // If we're running locally, meaning npm linked. This is basically "developer mode". -if (!__dirname.match(/\/node_modules\//)) { +if (!__dirname.match(new RegExp(`\\${path.sep}node_modules\\${path.sep}`))) { const packages = require('./packages'); // We mock the module loader so that we can fake our packages when running locally.