alibaba / ice

🚀 ice.js: The Progressive App Framework Based On React(基于 React 的渐进式应用框架)
https://ice.work
MIT License
17.96k stars 2.1k forks source link

[Bug] Icejs 1.10.0 找不到全局的store #3774

Closed myronliu347 closed 4 years ago

myronliu347 commented 4 years ago

What is the current behavior?

What is the expected behavior?**

Any additional comments?

{
  "alias": {
    "@": "./src/",
    "@projectList": "./src/pages/ProjectList/"
  },
  "plugins": [
    "build-plugin-icestark",
    [
      "build-plugin-fusion",
      {
        "themePackage": "@alife/theme-5358"
      }
    ],
    "build-plugin-fusion-unicode",
    [
      "build-plugin-moment-locales",
      {
        "locales": [
          "zh-cn"
        ]
      }
    ],
    "@ali/build-plugin-ice-def"
  ]
}

image image image

ClarkXia commented 4 years ago

推荐使用 src/store.ts 的方式维护全局 store https://ice.work/docs/guide/basic/store

imsobear commented 4 years ago

https://ice.work/docs/guide/basic/store#%E7%89%88%E6%9C%AC%E5%8F%98%E6%9B%B4%E8%AF%B4%E6%98%8E 补充了下文档