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 b6de4a8 commit f61411dCopy full SHA for f61411d
src/shell.js
@@ -235,9 +235,7 @@ if (ENVIRONMENT_IS_NODE) {
235
// EXPORT_ES6 + ENVIRONMENT_IS_NODE always requires use of import.meta.url,
236
// since there's no way getting the current absolute path of the module when
237
// 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
240
- scriptDirectory = require('url').fileURLToPath(new URL('./', Object(import.meta).url)); // includes trailing slash
+ scriptDirectory = path.dirname(require('url').fileURLToPath(import.meta.url)); // includes trailing slash
241
#else
242
scriptDirectory = __dirname + '/';
243
#endif
0 commit comments