Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] app.config.ts must be in the source directory, which is not necessarily the root #12463

Closed
jsulpis opened this issue Jan 2, 2023 · 2 comments · Fixed by nuxt/framework#9937

Comments

@jsulpis
Copy link
Contributor

jsulpis commented Jan 2, 2023

Hi, I see that there is a closed issue about that, but I still think the documentation is misleading:

The documentation clearly says that app.config.ts must be located at the root of a project. But as Daniel said in the previous issue, it must be in the srcDir, so if we change it in nuxt.config.ts, it is no more the root.

Here is what I suggest:

  • reword slightly the paragraph in Get Started > Configuration > App Configuration (or add a little "info panel" ?) to mention the source directory instead of root
  • update the folder structure in the nuxt config reference to show the app.config.ts in the src folder (and maybe app.vue too ?)

I would be happy to do the PR if you want

@pi0
Copy link
Member

pi0 commented Jan 3, 2023

Surely PR welcome to clarify app configuration section it is in the source directory not root.

Regarding folder structure, i belive to keep it simple, we can add a note before/after that this structure is relative to srcDir option.

BTW regarding why, rootDir defines the build time root of a Nuxt project while src is the runtime. And app.config is a runtime configuration and compiled same as other source code and .ts/.vue files.

@jsulpis
Copy link
Contributor Author

jsulpis commented Jan 3, 2023

Thank you for your feedback and explaination, here is the PR.
I don't understand "we can add a note before/after that this structure is relative to srcDir option." (not sure we talk about the same thing), so I only reworded the sentence in the configuration section. Tell me if you want me to update something else.

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants