-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Open
Description
Bug report
resolve.fallback and resolve.alias do not work with node:
prefix
What is the current behavior?
Module build failed: UnhandledSchemeError: Reading from "node:fs" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
If the current behavior is a bug, please provide the steps to reproduce.
webpack.config.js
module.exports = {
mode: "development",
target: "web",
entry: "./entry.js",
resolve: {
fallback: {
path: false,
'node:path': false,
},
alias: {
path: false,
'node:path': false,
}
}
};
entry.js
import * as mod from "node:fs";
console.log(mod);
What is the expected behavior?
fallback and aliases should work
Other relevant information:
webpack version: 5.52.0
Node.js version: any
Operating System: any
Additional tools: any
ryanio, fregante, chentsulin, amal, Bdragon93 and 21 more
Metadata
Metadata
Assignees
Type
Projects
Status
To be discussed
Status
Priority - Low