Files in node_modules are parsed on build
🐛 Bug Report
When running the command npm run build, files in the node_modules folder are checked by the engine.
This creates a lot of unnecessary overhead and logs many errors in the console like so:
[WARN] unresolved links in file 'website/node_modules/mixin-deep/node_modules/is-extendable/README.md' > [ '.verb.md' ] [WARN] unresolved links in file 'website/node_modules/mixin-deep/README.md' > [ '.verb.md' ] [WARN] unresolved links in file 'website/node_modules/nanomatch/README.md' > [ '.github/contributing.md', '.verb.md' ]
There also are some errors logged from the fixture files for the tests:
Header field "unlisted" in /home/jeahel/dev/the-hive/documentation/website/node_modules/docusaurus/lib/core/__tests__/__fixtures__/blog-post-with-draft.md is not supported. Header field "authorTwitter" in /home/jeahel/dev/the-hive/documentation/website/node_modules/docusaurus/lib/server/__tests__/__fixtures__/2018-08-17-docusaurus.md is not supported.
And some errors with BABEL, still in the node_modules folder:
[BABEL] Note: The code generator has deoptimised the styling of /home/jeahel/dev/the-hive/documentation/website/node_modules/docusaurus/lib/core/metadata.js as it exceeds the max of 500KB.
Have you read the Contributing Guidelines on issues?
I have.
To Reproduce
- Create a new Docusaurus project with
docusaurus-init - Build the website with
cd website && npm run build - Look at the console output
Expected behavior
I expect the engine not to go through the node_modules/ folder not to waste time, and no log errors about files I am not supposed/required to know about (errors about the fixtures and BABEL).
Actual Behavior
The opposite: all files from the dependencies in node_modules/ are parsed, and errors about unknown files are printed out.
Reproducible Demo
No need to clone a repo, juste create a new Docusaurus project with npx docusaurus-init.
Hi @glecetre, are you still seeing this issue? This is what I'm seeing:

I understood the problem and I'm sorry I did not come back sooner.
In my config file, I had changed the customDocsPath setting to avoid having a /docs folder, so I used the value ./. So of course there was the website folder, containing node_modules, and it was parsed by the engine.
Maybe you would want to change that behaviour to prevent parsing the website folder, but my bug in itself can be closed.
Thanks