Home  >  Q&A  >  body text

javascript - webpack packaging questions

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:

迷茫迷茫2683 days ago475

reply all(2)I'll reply

  • 仅有的幸福

    仅有的幸福2017-05-16 13:46:49

    Your question is not clear. I usually write the ignore directory manually, exclude: /node_modules/

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-16 13:46:49

    You don’t need to process it in node_modules. It is recommended to exclude it in babel-loader

    reply
    0
  • Cancelreply