@@ -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' ) ,
@@ -83,7 +85,7 @@ const resolveOwn = relativePath => path.resolve(__dirname, '..', relativePath);
83
85
module . exports = {
84
86
dotenv : resolveApp ( '.env' ) ,
85
87
appPath : resolveApp ( '.' ) ,
86
- appBuild : resolveApp ( 'build' ) ,
88
+ appBuild : resolveApp ( buildPath ) ,
87
89
appPublic : resolveApp ( 'public' ) ,
88
90
appHtml : resolveApp ( 'public/index.html' ) ,
89
91
appIndexJs : resolveModule ( resolveApp , 'src/index' ) ,
119
121
module . exports = {
120
122
dotenv : resolveOwn ( `${ templatePath } /.env` ) ,
121
123
appPath : resolveApp ( '.' ) ,
122
- appBuild : resolveOwn ( '../../build' ) ,
124
+ appBuild : resolveOwn ( path . join ( '../..' , buildPath ) ) ,
123
125
appPublic : resolveOwn ( `${ templatePath } /public` ) ,
124
126
appHtml : resolveOwn ( `${ templatePath } /public/index.html` ) ,
125
127
appIndexJs : resolveModule ( resolveOwn , `${ templatePath } /src/index` ) ,
0 commit comments