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 2582096 commit cb3eea8Copy full SHA for cb3eea8
lib/svgo-node.js
@@ -2,13 +2,15 @@ import os from 'os';
2
import fs from 'fs/promises';
3
import path from 'path';
4
import * as svgo from './svgo.js';
5
+import url from 'url';
6
7
/**
8
* @param {string} configFile
9
* @returns {Promise<import('./types.js').Config>}
10
*/
11
const importConfig = async (configFile) => {
- const imported = await import(path.resolve(configFile));
12
+ const resolvedPath = path.resolve(configFile);
13
+ const imported = await import(url.pathToFileURL(resolvedPath).toString());
14
const config = imported.default;
15
16
if (config == null || typeof config !== 'object' || Array.isArray(config)) {
0 commit comments