dynamicImport.cjs 566 B

12345678910111213141516171819
  1. // NOTICE: This file is generated by Rollup. To modify it,
  2. // please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
  3. 'use strict';
  4. const path = require('node:path');
  5. const node_url = require('node:url');
  6. /**
  7. * Dynamic import wrapper for compatibility with absolute paths on Windows
  8. *
  9. * @see https://github.com/stylelint/stylelint/issues/7382
  10. *
  11. * @param {string} path
  12. */
  13. function dynamicImport(path$1) {
  14. return import(path.isAbsolute(path$1) ? node_url.pathToFileURL(path$1).toString() : path$1);
  15. }
  16. module.exports = dynamicImport;