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 72016bc commit 5bbb5faCopy full SHA for 5bbb5fa
1 file changed
packages/core/src/lib/plugin-loader.ts
@@ -101,16 +101,9 @@ export async function loadPlugin(
101
for (const p of fallbackPaths) {
102
try {
103
logger.debug(`Attempting to load from: ${p}`);
104
- let mod2: { default?: unknown } | undefined;
105
- try {
106
- // Prefer require for CJS outputs
107
- // eslint-disable-next-line @typescript-eslint/no-var-requires
108
- mod2 = require(p);
109
- } catch {
110
- const { pathToFileURL } = await import('node:url');
111
- const url = pathToFileURL(p).href;
112
- mod2 = (await import(url)) as { default?: unknown };
113
- }
+ const { pathToFileURL } = await import('node:url');
+ const url = pathToFileURL(p).href;
+ const mod2 = (await import(url)) as { default?: unknown };
114
115
if (isGeneratorPlugin(mod2?.default)) {
116
const plugin2 = mod2.default;
0 commit comments