Directory structure and webpack.config file, as follows:
After executing the command webpack webpack.config.js, the error is reported as follows:
Question
I did not write in the configuration file to package the files in node_modules, but it seems that the contents of the webpack module in node_modules are also packaged. Is this causing the can't not resolve 'fs' error?
Have any friends also encountered this problem? Please ask a god to answer my questions!
My version is as follows:
Your question is not clear. I usually write the ignore directory manually, exclude: /node_modules/
You don’t need to process it in node_modules. It is recommended to exclude it in babel-loader