We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca3361e commit c3f8acaCopy full SHA for c3f8aca
src/index.js
@@ -2,7 +2,7 @@
2
3
const { join } = require('path')
4
5
-const { copy } = require('fs-extra')
+const { copy, existsSync } = require('fs-extra')
6
7
const { ODB_FUNCTION_NAME, HANDLER_FUNCTION_NAME } = require('./constants')
8
const { restoreCache, saveCache } = require('./helpers/cache')
@@ -51,9 +51,10 @@ module.exports = {
51
setIncludedFiles({ netlifyConfig, publish })
52
53
await generateFunctions(constants, appDir)
54
-
55
- await copy(`${appDir}/public`, `${publish}/`)
56
+ const publicDir = join(appDir, 'public')
+ if (existsSync(publicDir)) {
+ await copy(publicDir, `${publish}/`)
57
+ }
58
await setupImageFunction({ constants, imageconfig: images, netlifyConfig, basePath })
59
60
await generateRedirects({
0 commit comments