-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
When using netlifyToml as a normal function in nuxt.config.js as so:
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
[[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.
Any idea?
Metadata
Metadata
Assignees
Labels
No labels