We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a19293 commit 666bf77Copy full SHA for 666bf77
src/postgraphile/cli.ts
@@ -604,6 +604,17 @@ const loadPlugins = (rawNames: mixed) => {
604
}
605
const name = String(rawName);
606
const parts = name.split(':');
607
+ if (
608
+ process.platform === 'win32' &&
609
+ parts[0].length === 1 &&
610
+ /^[a-z]$/i.test(parts[0]) &&
611
+ ['\\', '/'].includes(name[2])
612
+ ) {
613
+ // Assume this is a windows path `C:/path/to/module.js` or `C:\path\to\module.js`
614
+ const driveLetter = parts.shift();
615
+ // Add the drive part back onto the path
616
+ parts[0] = `${driveLetter}:${parts[0]}`;
617
+ }
618
let root;
619
try {
620
root = require(String(parts.shift()));
0 commit comments