File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
packages/runtime/plugin-runtime/src/ssr/cli Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @modern-js/runtime ' : patch
3
+ ---
4
+
5
+ fix: config hook can't get nomarlized config
6
+ fix: config hook 不能拿到固定后的 config
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export default (): CliPlugin<AppTools> => ({
54
54
'plugins' ,
55
55
) ;
56
56
57
- const userConfig = api . useResolvedConfigContext ( ) ;
57
+ const userConfig = api . useConfigContext ( ) ;
58
58
const { bundlerType = 'webpack' } = api . useAppContext ( ) ;
59
59
// eslint-disable-next-line consistent-return
60
60
const babelConfig = ( ( ) => {
@@ -67,7 +67,10 @@ export default (): CliPlugin<AppTools> => ({
67
67
path . join ( __dirname , './babel-plugin-ssr-loader-id' ) ,
68
68
) ;
69
69
70
- if ( isUseSSRBundle ( userConfig ) && hasStringSSREntry ( userConfig ) ) {
70
+ if (
71
+ isUseSSRBundle ( userConfig ) &&
72
+ hasStringSSREntry ( userConfig as any )
73
+ ) {
71
74
config . plugins ?. push ( require . resolve ( '@loadable/babel-plugin' ) ) ;
72
75
}
73
76
} ;
@@ -80,7 +83,7 @@ export default (): CliPlugin<AppTools> => ({
80
83
config . plugins ?. push (
81
84
path . join ( __dirname , './babel-plugin-ssr-loader-id' ) ,
82
85
) ;
83
- if ( hasStringSSREntry ( userConfig ) ) {
86
+ if ( hasStringSSREntry ( userConfig as any ) ) {
84
87
config . plugins ?. push (
85
88
require . resolve ( '@loadable/babel-plugin' ) ,
86
89
) ;
You can’t perform that action at this time.
0 commit comments