Skip to content

Commit

Permalink
Merge pull request #344 from pirxthedev/main
Browse files Browse the repository at this point in the history
Fix ERR_UNSUPPORTED_ESM_URL_SCHEME on Windows
  • Loading branch information
robertknight committed Jun 22, 2023
2 parents f2a699c + ddafa1a commit 17cbedd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rollup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { resolve } from 'path';
import url from 'url';

import log from 'fancy-log';
import * as rollup from 'rollup';
Expand All @@ -10,7 +11,7 @@ function logRollupWarning(warning) {

/** @param {string} path */
async function readConfig(path) {
const { default: config } = await import(resolve(path));
const { default: config } = await import(url.pathToFileURL(resolve(path)));
return Array.isArray(config) ? config : [config];
}

Expand Down

0 comments on commit 17cbedd

Please sign in to comment.