Skip to content

v3.4.6

Compare
Choose a tag to compare
@ClarkXia ClarkXia released this 25 Mar 06:40
· 86 commits to master since this release
ea7d71e
  • 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
  • Refactor: use the same compiler when build data-loader ( speedup mode only) #6804
  • Fix: ignore basename in single route mode when route do not match #6833
  • Feat: upgrate pack-binding for new compile feature #6832
  • Fix(rax-compat): export createElement for rax-compat #6814