We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using netlifyToml as a normal function in nuxt.config.js as so:
nuxt.config.js
export default { // ... netlifyFiles: { copyExistingFiles: false, netlifyToml() { return { redirects: [{ from: '/test', to: '/test-1', status: 301}] } } } }
The module returns a correct netlify.toml file after yarn generate
netlify.toml
yarn generate
[[redirects]] from = "test" to = "test-1" status = 301
But when using an async function as so:
// Just an example function redirects() { return new Promise(resolve => { resolve({ redirects: [ { from: "test", to: "test-1", status: 301 } ] }); }); } export default { // ... netlifyFiles: { copyExistingFiles: false, async netlifyToml() { return await redirects(); } } }
A netlify.toml will be generated in /dist, but the content is blank.
/dist
Any idea?
The text was updated successfully, but these errors were encountered:
@Aztriltus did you manage to fix this?
Sorry, something went wrong.
Hey @bootsmann1995 I didn't manage to. I've used another way of redirecting now
I'm running into the same issue. When using an async function the object is empty.
No branches or pull requests
When using netlifyToml as a normal function in
nuxt.config.js
as so:The module returns a correct
netlify.toml
file afteryarn generate
But when using an async function as so:
A
netlify.toml
will be generated in/dist
, but the content is blank.Any idea?
The text was updated successfully, but these errors were encountered: