@@ -34,6 +34,7 @@ const distPath = process.env.DIST_PATH || 'dist';
34
34
const isBuildingBundle =
35
35
process . env . BUILD_ESM_BUNDLE === 'true' ||
36
36
process . env . BUILD_UMD_BUNDLE === 'true' ;
37
+ const isRunningE2ETests = process . env . E2E_TESTS === 'true' ;
37
38
38
39
const moduleFileExtensions = [
39
40
'web.mjs' ,
@@ -68,8 +69,10 @@ module.exports = {
68
69
appPath : resolveApp ( '.' ) ,
69
70
appBuild : resolveApp ( buildPath ) ,
70
71
appDist : resolveApp ( distPath ) ,
71
- appPublic : resolveApp ( 'public' ) ,
72
- appHtml : resolveApp ( 'public/index.html' ) ,
72
+ appPublic : resolveApp ( isRunningE2ETests ? 'test/cypress/static' : 'public' ) ,
73
+ appHtml : resolveApp (
74
+ isRunningE2ETests ? 'test/cypress/static/index.html' : 'public/index.html'
75
+ ) ,
73
76
appIndexJs : resolveModule (
74
77
resolveApp ,
75
78
isBuildingBundle ? 'src/App' : 'src/index'
@@ -97,8 +100,10 @@ module.exports = {
97
100
appPath : resolveApp ( '.' ) ,
98
101
appBuild : resolveApp ( buildPath ) ,
99
102
appDist : resolveApp ( distPath ) ,
100
- appPublic : resolveApp ( 'public' ) ,
101
- appHtml : resolveApp ( 'public/index.html' ) ,
103
+ appPublic : resolveApp ( isRunningE2ETests ? 'test/cypress/static' : 'public' ) ,
104
+ appHtml : resolveApp (
105
+ isRunningE2ETests ? 'test/cypress/static/index.html' : 'public/index.html'
106
+ ) ,
102
107
appIndexJs : resolveModule (
103
108
resolveApp ,
104
109
isBuildingBundle ? 'src/App' : 'src/index'
0 commit comments