Skip to content

Nuxt Module that generate CNAME file in nuxt generate mode - VueJS

License

Notifications You must be signed in to change notification settings

FBerthelot/nuxt-cname-module

Repository files navigation

nuxt-cname-module

Nuxt Module that generate CNAME file in nuxt generate mode - VueJS

Note: CNAME is only enabled in generate mode.

Build Status npm npm (scoped with tag)

Getting started

Install

Install it via NPM:

npm i nuxt-cname-module

or via yarn:

yarn add nuxt-cname-module

Add to nuxt

Add it to your nuxt.config.js file.

  /** ... **/
  modules: [
    /* ... */
   ['nuxt-cname-module', { baseUrl: 'myFunnyUrl.com' }],
  ]
  /** ... **/

Options

baseUrl

  • [Required] Should be a string

generateCNAME

  • [Optional] If set to false, cname is never generated (default to true)

Environment variable

You can overwrite all you setting via environment variable like this:

baseUrl="anotherFunnyUrl.com" generateCNAME=true npm run generate

nuxt env variable

You can also use env variable in nuxt.config.js:

/** ... **/
modules: [
  /* ... */
 ['nuxt-cname-module'],
],
env: {
  baseUrl: 'myFunnyUrl.com'
}
/** ... **/

About

Nuxt Module that generate CNAME file in nuxt generate mode - VueJS

Resources

License

Stars

Watchers

Forks

Packages

No packages published