add default files to ignore for smart rebuild

This commit is contained in:
Pooya Parsa 2020-11-06 13:41:33 +01:00
parent b86eb3d741
commit 5647d2dad0
4 changed files with 10 additions and 2 deletions

View File

@ -27,6 +27,7 @@ export interface SLSOptions {
minify: boolean
rollupConfig?: any
fullStatic: boolean,
generateIgnore: string[]
staticAssets: {
base: string
versionBase: string

View File

@ -33,6 +33,7 @@ export default <Module> function slsModule () {
nuxt.hook('generate:cache:ignore', (ignore) => {
ignore.push(options.slsDir)
ignore.push(options.targetDir)
ignore.push(...options.generateIgnore)
})
nuxt.hook('generate:page', (page) => {

View File

@ -3,5 +3,8 @@ import { SLSTarget } from '../config'
import { lambda } from './lambda'
export const netlify: SLSTarget = extendTarget(lambda, {
generateIgnore: [
'netlify.toml',
'_redirects'
]
})

View File

@ -3,5 +3,8 @@ import { SLSTarget } from '../config'
import { node } from './node'
export const vercel: SLSTarget = extendTarget(node, {
targetDir: '{{ rootDir }}/api'
targetDir: '{{ rootDir }}/api',
generateIgnore: [
'vercel.json'
]
})