Skip to content

Commit 7870ea6

Browse files
authored
fix: ignore warning when use legacy state (#7122)
1 parent 329d8ea commit 7870ea6

File tree

1 file changed

+3
-1
lines changed
  • packages/solutions/app-tools/src/run

1 file changed

+3
-1
lines changed

packages/solutions/app-tools/src/run/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,14 @@ export async function run({
113113
userConfig.autoLoadPlugins,
114114
);
115115

116+
// We need exclude warning when use legacy state plugin, it's a inhouse logic.
116117
if (
117118
!userConfig.autoLoadPlugins &&
118119
userConfig.runtime &&
119120
typeof userConfig.runtime !== 'boolean' &&
120121
(userConfig.runtime?.state === true ||
121-
typeof userConfig.runtime?.state === 'object')
122+
(typeof userConfig.runtime?.state === 'object' &&
123+
!userConfig.runtime?.state?.legacy))
122124
) {
123125
if (!userConfig.plugins.find(plugin => plugin.name === statePluginName)) {
124126
console.warn(

0 commit comments

Comments
 (0)