Home

Issue: 2311

[feature request] Ignore files with a prefix in all filesystem APIs

[issue link]

In at least pages/, middleware/, store/, files (and directories(?)) that begin with a certain character or series of characters should not suffer the indignity of automatic import.

Pros:

  • Will allow quickly working around issues such as #2310, while keeping the .ts file next to the .js file that is reexporting it.
  • Will allow to better organize source code:
    • utils shared by many store modules and only store modules go in store/
    • utils shared by many pages and only pages go in pages/
    • components shared by a group of pages go in group/
    • utils shared by many middlewares and only middlewares go in middleware/
    • etc.

Cons:

  • Absolutely none, not breaking if the prefix is not set by default

The prefix should be configurable in nuxt.config.js, including disabling it if one is set by default.

This feature request is available on Nuxt.js community (#c2018)