Skip to content

Commit d0e78a6

Browse files
committed
fix
1 parent 54e5f28 commit d0e78a6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/core/src/createContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export async function updateEnvironmentContext(
131131
},
132132
});
133133

134-
context.environmentList.push(readonlyEnvironmentContext);
134+
context.environmentList[index] = readonlyEnvironmentContext;
135135
context.environments[name] = readonlyEnvironmentContext;
136136
}
137137
}

packages/core/tests/helpers.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ test('should getRoutes correctly', () => {
1515
base: '/',
1616
},
1717
},
18-
environments: {
19-
web: {
18+
environmentList: [
19+
{
2020
distPath: join(cwd, 'dist'),
2121
htmlPaths: {
2222
index: 'index.html',
@@ -32,7 +32,7 @@ test('should getRoutes correctly', () => {
3232
},
3333
},
3434
},
35-
web1: {
35+
{
3636
distPath: join(cwd, 'dist/web1'),
3737
htmlPaths: {
3838
index: 'index.html',
@@ -48,7 +48,7 @@ test('should getRoutes correctly', () => {
4848
},
4949
},
5050
},
51-
web2: {
51+
{
5252
distPath: join(cwd, 'dist/web2'),
5353
htmlPaths: {
5454
index: 'index.html',
@@ -65,7 +65,7 @@ test('should getRoutes correctly', () => {
6565
},
6666
},
6767
},
68-
},
68+
],
6969
} as unknown as InternalContext),
7070
).toEqual([
7171
{

0 commit comments

Comments
 (0)