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.
pathToFileURL
1 parent d16df93 commit 97ad2f5Copy full SHA for 97ad2f5
apps/oxlint/src-js/plugins/load.ts
@@ -1,3 +1,5 @@
1
+import { pathToFileURL } from 'node:url';
2
+
3
import { Context } from './context.js';
4
import { getErrorMessage } from './utils.js';
5
@@ -100,7 +102,7 @@ async function loadPluginImpl(path: string): Promise<PluginDetails> {
100
102
throw new Error('This plugin has already been registered. This is a bug in Oxlint. Please report it.');
101
103
}
104
- const { default: plugin } = (await import(path)) as { default: Plugin };
105
+ const { default: plugin } = (await import(pathToFileURL(path).href)) as { default: Plugin };
106
107
registeredPluginPaths.add(path);
108
0 commit comments