API: The srcDir Property
- Type:
String
- Default: rootDir value
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
.