v3.4.6
ClarkXia
released this
25 Mar 06:40
·
97 commits
to master
since this release
- Feat: support dynamic import API for different scenario #6831
import { dynamic } from 'ice';
const ComponentA = dynamic(() => import('../components/A'));
const ComponentB = dynamic(() => import('../components/B'));
const ComponentC = dynamic(() => import('../components/C'), { ssr: false });
export default function Home({ show }) {
return (
<>
{/* load immediately, but in a separate client bundle */}
<ComponentA />
{/* load only the show is true */}
{show && <ComponentB />}
{/* load only on the client side */}
<ComponentC />
</>
);
}
Kudos to @HomyeeKing .
- Feat: support props for
KeepAliveOutlet
#6819
import { KeepAliveOutlet } from 'ice';
export default function Layout() {
return (
<div>
<h2>Layout</h2>
{/* limit is the limitation number of outlets to keep alive. */}
{/* when paths is configured, only the specified paths will be kept alive. */}
<KeepAliveOutlet limit={2} paths={['/home']} />
</div>
);
}
- Feat: support add plugin by cli option #6829
ice start -- --plugin @ice/plugin-analyze