This is related, and noted in PR #2594. There was no issue created, so I figured I would document this.
Currently I have a store
folder that holds my modules. It has an index.js
file that exports the store creation function. I also keep tests next to the files in the form of module.integration.js
or module.spec.js
. Currently nuxt tries to import these tests files (even though they are ignored), which causes a huge amount of webpack errors.
ERROR Failed to compile with 22 errors 14:08:26
These dependencies were not found:
* child_process in ./node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js
* fs in ./node_modules/ava/lib/snapshot-manager.js, ./node_modules/ava/lib/process-adapter.js and 12 others
* module in ./node_modules/require-extension-hooks/src/index.js, ./node_modules/time-require/src/requireHook.js
* net in ./node_modules/forever-agent/index.js, ./node_modules/tough-cookie/lib/cookie.js and 1 other
* tls in ./node_modules/forever-agent/index.js, ./node_modules/tunnel-agent/index.js
Relevent code line: https://github.com/nuxt/nuxt.js/blob/dev/lib/app/store.js#L7
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This feature request is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2523">#c2523</a>)</em></sub></div>