File tree Expand file tree Collapse file tree 5 files changed +20
-3
lines changed
solutions/app-tools/src/analyze Expand file tree Collapse file tree 5 files changed +20
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @modern-js/plugin-testing ' : patch
3
+ ' @modern-js/app-tools ' : patch
4
+ ' @modern-js/plugin-proxy ' : patch
5
+ ---
6
+
7
+ fix: the proxy should not recreated when exists
8
+ fix: proxy server 不应该被重新创建当存在时
Original file line number Diff line number Diff line change @@ -23,8 +23,10 @@ export default (): CliPlugin => {
23
23
}
24
24
25
25
const rule = createProxyRule ( internalDirectory , dev . proxy ) ;
26
- proxyServer = new WhistleProxy ( { port : 8899 , rule } ) ;
27
- await proxyServer . start ( ) ;
26
+ if ( ! proxyServer ) {
27
+ proxyServer = new WhistleProxy ( { port : 8899 , rule } ) ;
28
+ await proxyServer . start ( ) ;
29
+ }
28
30
} ,
29
31
30
32
beforeExit ( ) {
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export const setJestConfigForBFF = async ({
30
30
setupFilesAfterEnv : [ require . resolve ( './setup' ) ] ,
31
31
testEnvironment : 'node' ,
32
32
testMatch : [ `**/api/**/*.test.[jt]s` ] ,
33
+ modulePathIgnorePatterns : [ 'config.test.ts' ] ,
33
34
globals : {
34
35
[ bff_info_key ] : {
35
36
appDir : pwd ,
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ exports[`testing-plugin-bff setJestConfigForBFF 1`] = `
13
13
},
14
14
},
15
15
" moduleNameMapper" : {},
16
+ " modulePathIgnorePatterns" : [
17
+ " config.test.ts" ,
18
+ ],
16
19
" resolver" : " /packages/runtime/plugin-testing/src/base/config/resolver.ts" ,
17
20
" rootDir" : " /packages/runtime/plugin-testing/tests/bff/fixtures/bff1/api" ,
18
21
" setupFilesAfterEnv" : [
@@ -50,6 +53,9 @@ exports[`testing-plugin-bff testTimeout should not set in projects 1`] = `
50
53
},
51
54
},
52
55
" moduleNameMapper" : {},
56
+ " modulePathIgnorePatterns" : [
57
+ " config.test.ts" ,
58
+ ],
53
59
" resolver" : " /packages/runtime/plugin-testing/src/base/config/resolver.ts" ,
54
60
" rootDir" : " /packages/runtime/plugin-testing/tests/bff/fixtures/bff1/api" ,
55
61
" setupFilesAfterEnv" : [
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ export const getBundleEntry = (
92
92
: undefined ,
93
93
} ;
94
94
95
- if ( entrypoint . fileSystemRoutes && isRouterV5 ( config ) ) {
95
+ if ( entrypoint . fileSystemRoutes && ! isRouterV5 ( config ) ) {
96
96
entrypoint . nestedRoutesEntry = entrypoint . entry ;
97
97
}
98
98
if ( ! ifAlreadyExists ( defaults , entrypoint ) ) {
You can’t perform that action at this time.
0 commit comments