A NuxtJS module that makes a 301 redirection to a non trailing slash URL
- npm or yarn
- NuxtJS
- NodeJS
$ npm install --save nuxt-trailingslash-module
// or
$ yarn add nuxt-trailingslash-module
Add nuxt-trailingslash-module
to modules
section of nuxt.config.js
.
{
modules: [
// Simple usage
'nuxt-trailingslash-module',
// With options
['nuxt-trailingslash-module', {
/* module options */
methods: [
'GET',
'HEAD',
],
}],
]
}
or even
{
modules: [
'nuxt-trailingslash-module',
],
trailingslash: {
methods: [
'GET',
'HEAD',
],
},
}