@@ -5,7 +5,6 @@ const { Builder } = require("@sls-next/lambda-at-edge");
55
66const obtainDomains = require ( "./lib/obtainDomains" ) ;
77const { DEFAULT_LAMBDA_CODE_DIR , API_LAMBDA_CODE_DIR } = require ( "./constants" ) ;
8- const getAllFiles = require ( "./lib/getAllFiles" ) ;
98const join = path . join ;
109const emptyDir = fse . emptyDir ;
1110
@@ -18,21 +17,6 @@ class NextjsComponent extends Component {
1817 return this . deploy ( inputs ) ;
1918 }
2019
21- async readPublicFiles ( nextConfigPath ) {
22- const dirExists = await fse . exists ( join ( nextConfigPath , "public" ) ) ;
23- if ( dirExists ) {
24- return getAllFiles ( join ( nextConfigPath , "public" ) )
25- . map ( e => e . replace ( nextConfigPath , "" ) )
26- . map ( e =>
27- e
28- . split ( path . sep )
29- . slice ( 2 )
30- . join ( "/" )
31- ) ;
32- } else {
33- return [ ] ;
34- }
35- }
3620 readDefaultBuildManifest ( nextConfigPath ) {
3721 return fse . readJSON (
3822 join ( nextConfigPath , ".serverless_nextjs/default-lambda/manifest.json" )
@@ -49,13 +33,6 @@ class NextjsComponent extends Component {
4933 : Promise . resolve ( undefined ) ;
5034 }
5135
52- async emptyBuildDirectory ( nextConfigPath ) {
53- return Promise . all ( [
54- emptyDir ( join ( nextConfigPath , DEFAULT_LAMBDA_CODE_DIR ) ) ,
55- emptyDir ( join ( nextConfigPath , API_LAMBDA_CODE_DIR ) )
56- ] ) ;
57- }
58-
5936 async build ( inputs = { } ) {
6037 const nextConfigPath = inputs . nextConfigDir
6138 ? path . resolve ( inputs . nextConfigDir )
0 commit comments