resolve.fallback and resolve.alias do not work with `node:` prefix
See original GitHub issueBug 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
Issue Analytics
- State:
- Created 2 years ago
- Reactions:12
- Comments:13 (11 by maintainers)
Top Results From Across the Web
Resolve | webpack
Create aliases to import or require certain modules more easily. ... Setting resolve.alias to false will tell webpack to ignore a module.
Read more >Webpack resolve.alias breaks import of libraries prefixed with an
I am working on a Vue project where I'm attempting to use VuexORM. Upon initial install, I was getting an odd error: Module...
Read more >resolve.fallback: { "path": false } - You.com - You.com
Setting resolve.alias to false will tell webpack to ignore a module. ... and resolve.alias do not work with `node:` prefix#14166. Created over 1...
Read more >Module Resolution or Import Alias: The Final Guide - Raul Melo
Tired to have weird imports? It's time to learn how can you enable aliases to your imports and let code more organized.
Read more >Resolve - webpack 3 documentation
Have a look at Module Resolution for more explanation of how the resolver works. ... Create aliases to import or require certain modules...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
bump
on
webpack@6
board…