Setup
Installation
-
Add
@nuxtjs/speedcurvedependency to your project:yarn add @nuxtjs/speedcurvenpm install @nuxtjs/speedcurve -
Add
nuxt-moduleto themodulessection ofnuxt.config.jsnuxt.config.jsexport default { modules: [ '@nuxtjs/speedcurve' ] }
Configure
Add a section called lux to your nuxt.config.js and set id to the Speedcurve LUX Id from your dashboard.
nuxt.config.js
export default {
modules: [
'@nuxtjs/speedcurve'
],
lux: {
id: 'YOUR_LUX_ID',
// more options
}
}
See options section for all available options.
Runtime Configs
Runtime configs are also supported. Just create a lux section in your nuxt.config.js:
nuxt.config.js
export default {
publicRuntimeConfig: {
lux: {
id: 'YOUR_LUX_ID'
}
}
}
All other runtime config methods are also supported. For more information visit the Runtime Config section of the Nuxt docs.