Skip to content

Commit b6de4a8

Browse files
committed
Adding comment for future maintainers.
1 parent 206c3e1 commit b6de4a8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/shell.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ if (ENVIRONMENT_IS_NODE) {
235235
// EXPORT_ES6 + ENVIRONMENT_IS_NODE always requires use of import.meta.url,
236236
// since there's no way getting the current absolute path of the module when
237237
// support for that is not available.
238+
// Using Object(import.meta).url here to prevent Webpack from trying to resolve the URL
239+
// https://github.com/webpack/webpack/issues/16878
238240
scriptDirectory = require('url').fileURLToPath(new URL('./', Object(import.meta).url)); // includes trailing slash
239241
#else
240242
scriptDirectory = __dirname + '/';

0 commit comments

Comments
 (0)