first commit
This commit is contained in:
13
node_modules/stylelint/lib/utils/dynamicImport.mjs
generated
vendored
Normal file
13
node_modules/stylelint/lib/utils/dynamicImport.mjs
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { isAbsolute } from 'node:path';
|
||||
import { pathToFileURL } from 'node:url';
|
||||
|
||||
/**
|
||||
* Dynamic import wrapper for compatibility with absolute paths on Windows
|
||||
*
|
||||
* @see https://github.com/stylelint/stylelint/issues/7382
|
||||
*
|
||||
* @param {string} path
|
||||
*/
|
||||
export default function dynamicImport(path) {
|
||||
return import(isAbsolute(path) ? pathToFileURL(path).toString() : path);
|
||||
}
|
||||
Reference in New Issue
Block a user