Nuxt Module that generate CNAME file in nuxt generate mode - VueJS
Note: CNAME is only enabled in generate mode.
Install it via NPM:
npm i nuxt-cname-module
or via yarn:
yarn add nuxt-cname-module
Add it to your nuxt.config.js
file.
/** ... **/
modules: [
/* ... */
['nuxt-cname-module', { baseUrl: 'myFunnyUrl.com' }],
]
/** ... **/
- [Required] Should be a string
- [Optional] If set to false, cname is never generated (default to true)
You can overwrite all you setting via environment variable like this:
baseUrl="anotherFunnyUrl.com" generateCNAME=true npm run generate
You can also use env variable in nuxt.config.js
:
/** ... **/
modules: [
/* ... */
['nuxt-cname-module'],
],
env: {
baseUrl: 'myFunnyUrl.com'
}
/** ... **/