@@ -29,6 +29,8 @@ const publicUrlOrPath = getPublicUrlOrPath(
29
29
process . env . PUBLIC_URL
30
30
) ;
31
31
32
+ const buildPath = process . env . BUILD_PATH || 'build' ;
33
+
32
34
const moduleFileExtensions = [
33
35
'web.mjs' ,
34
36
'mjs' ,
@@ -60,7 +62,7 @@ const resolveModule = (resolveFn, filePath) => {
60
62
module . exports = {
61
63
dotenv : resolveApp ( '.env' ) ,
62
64
appPath : resolveApp ( '.' ) ,
63
- appBuild : resolveApp ( 'build' ) ,
65
+ appBuild : resolveApp ( buildPath ) ,
64
66
appPublic : resolveApp ( 'public' ) ,
65
67
appHtml : resolveApp ( 'public/index.html' ) ,
66
68
appIndexJs : resolveModule ( resolveApp , 'src/index' ) ,
@@ -82,7 +84,7 @@ const resolveOwn = relativePath => path.resolve(__dirname, '..', relativePath);
82
84
module . exports = {
83
85
dotenv : resolveApp ( '.env' ) ,
84
86
appPath : resolveApp ( '.' ) ,
85
- appBuild : resolveApp ( 'build' ) ,
87
+ appBuild : resolveApp ( buildPath ) ,
86
88
appPublic : resolveApp ( 'public' ) ,
87
89
appHtml : resolveApp ( 'public/index.html' ) ,
88
90
appIndexJs : resolveModule ( resolveApp , 'src/index' ) ,
117
119
module . exports = {
118
120
dotenv : resolveOwn ( `${ templatePath } /.env` ) ,
119
121
appPath : resolveApp ( '.' ) ,
120
- appBuild : resolveOwn ( '../../build' ) ,
122
+ appBuild : resolveOwn ( path . join ( '../..' , buildPath ) ) ,
121
123
appPublic : resolveOwn ( `${ templatePath } /public` ) ,
122
124
appHtml : resolveOwn ( `${ templatePath } /public/index.html` ) ,
123
125
appIndexJs : resolveModule ( resolveOwn , `${ templatePath } /src/index` ) ,
0 commit comments