API: The srcDir Property

Define the source directory of your Nuxt.js application

Example (nuxt.config.js):

export default {
  srcDir: 'client/'

Then, your application structure can be:

-| app/
---| node_modules/
---| client/
------| assets/
------| components/
------| layouts/
------| middleware/
------| pages/
------| plugins/
------| static/
------| store/
---| nuxt.config.js
---| package.json

This option is useful to have a custom server and using Nuxt.js, so all npm dependencies can be regrouped in one package.json.


Caught a mistake or want to contribute to the documentation? Edit this page on GitHub!

Platinum Sponsors

Support Us