Skip to content

Releases: alibaba/ice

v3.1.4

20 Mar 03:36
7f7f446
Compare
Choose a tag to compare
  • Fix: static resource should not render by SSR middleware #6070
  • Fix: source code of react should not packed in dataLoader #6061
  • Fix: revert build config of PR #6041 , and external node builtin modules by esbuild plugin #6088

v3.1.3

20 Mar 03:32
b04a59c
Compare
Choose a tag to compare
  • Feat: support route index and nested url without nested layout #6003

Support access /about/repo/$id by create route component about.repo.$id.tsx.

└── src
    ├── root.jsx
    └── pages
-       ├── about
-       │   ├── repo
-       │   │   └── $id.tsx
        │   └── index.tsx
+       └── about.repo.$id.tsx

Remain route path by [] which matches routing rules, such as index

route component route
src/pages/[index].tsx /index
src/pages/about/[index].tsx /about/index

Visit docs for more details.

  • Fix: HMR is reliable when develop #6004
  • Fix: build error when use wildcard route #6023 #6022
  • Fix: make sure server env variable is always false when CSR #6002
  • Fix: error caused by dataLoader when navigate #6044 #6039 #5974 #5888
  • Fix: useState parameter of initialState can be function in rax-compat mode #6033
  • Fix: dataLoader build error when config custom fetcher #6035
  • Fix: avoid remount when micro app is loaded in other micro app framework #6036
  • chore: imporve build preformance by using async function #6053
  • chore: add leading slash for basename in case of unexpected config #6058
  • chore: make server.onDemand optional #6010
  • chore: update init cli command for project scaffolds #5720

v3.1.2

06 Mar 02:45
c23c10e
Compare
Choose a tag to compare

Enable on demand compile by config ice.config.mts:

import { defineConfig } from '@ice/app';
import SpeedMeasurePlugin from 'speed-measure-webpack-plugin';
import customPlugin from './plugin';

export default defineConfig(() => ({
  ssr: true,
  server: {
    onDemand: true,
    // Strongly recommand to set esm format when use on demand compilation.
    format: 'esm',
  },
}));
  • Feat: support routes config for custom routing rules. #5852
import { defineConfig } from '@ice/app';

export default defineConfig({
  routes: {
    config: [
      {
        path: 'rewrite',
        // 从 src/page 开始计算路径,并且需要写后缀
        component: 'sales/layout.tsx',
        children: [
          {
            path: '/favorites',
            component: 'sales/favorites.tsx',
          },
          {
            path: 'overview',
            component: 'sales/overview.tsx',
          },
          {
            path: 'recommends',
            component: 'sales/recommends.tsx',
          },
        ],
      },
      {
        path: '/',
        component: 'index.tsx',
      },
    ],
  },
});

We strongly recommend to use file system routing, which makes routes more predictable and intuitive.

v3.1.1

20 Feb 03:58
6dfc4b0
Compare
Choose a tag to compare
  • Feat: support API for get route manifest getRouteManifest and flatten routes getFlattenRoutes #5915
  • Fix: custom host and port by userConfig and env #5895
  • Fix: dev process exit when compile error occurs #5886
  • Fix: .browserslist do not works for code compilation #5906
  • Fix: pre bundle runtime dependencies with format esm #5935
  • Feat: add generator API for custom document components #5917 #5934
  • Fix: the value of isServer is false when compile dataLoader.js #5897
  • Fix: optimize terminal log #5912 #5859

v3.1.0

06 Feb 02:39
a364a61
Compare
Choose a tag to compare
  • Feat: 🚀 support suspense SSR #5801
// New API from ice for Suspense SSR
import { useSuspenseData, withSuspense } from 'ice';

function Comments() {
  const comments = useSuspenseData(getData);
  return (
    <div>
      {comments.map((comment, i) => (
        <p className="comment" key={i}>
          {comment}
        </p>
      ))}
    </div>
  );
}

export default withSuspense(Comments);

const fakeData = [
  "Wait, it doesn't wait for React to load?",
  'How does this even work?',
  'I like marshmallows',
];

async function getData() {
  await new Promise((resolve) => {
    setTimeout(() => resolve(null), 3000);
  });
  return fakeData;
}
  • Feat: mark ice.js works properly with weex2.0 and support js entry #5615 #5728 #5763
  • Feat: support dynamic dataLoader for PHA #5808
  • Refactor: support keep platform code by alias to runtime generation #5710
  • Fix: build error with use dynamic import #5840
  • Fix: render duplicate element when use rax compat mode #5847
  • Fix: compatible with document with has not meta element #5816
  • Fix: support lifecycle of bootstrap when use @ice/plugin-icestark #5825
  • Fix: set the right target for build data-loader.js #5843
  • Fix: process exit when error occur in development #5827

v3.0.6

12 Jan 08:17
8ef7703
Compare
Choose a tag to compare
  • Feat: support import.meta.target, import.meta.renderer and import.meta.env.* #5700
  • Feat: enhance memory router and support configure routes.injectInitialEntry #5800

Enable routes.injectInitialEntry when deploy memory router app by assets:

import { defineConfig } from '@ice/app';

export default defineConfig(() => ({
  splitChunks: false,
  routes: {
    injectInitialEntry: true,
  },
}));
  • Feat: support jsx runtime in rax compat mode #5803
  • Fix: pageConfig do not work when added to a new route file #5659
  • Fix: rebuild server entry when document changed #5795
  • Fix: remove ast node of ObjectProperties when disable ssg for document render #5785
  • Fix: error occur when disable SSR and SSG #5719
  • Fix(plugin-icestark): modify basename when render as a child app #5810

v3.0.5

12 Jan 08:10
bb9386d
Compare
Choose a tag to compare

HotFix: bump @swc/helpers version to fix compile error #5768

v3.0.4

27 Dec 10:37
2300505
Compare
Choose a tag to compare
  • Feat: support Nodejs 18 #5714
  • Feat: reduce code size by externalHelpers #5730
  • Feat: friendly log for developer #5690
  • Fix: refactor server compiler of alias #5732
  • Fix: re-compiler modules which depended by dataLoader #5709
  • Fix: bump version of esbuild (0.14 -> 0.16) and support incremental build of server compiler #5708
  • Fix: the error of switching route in react 16 #5739
  • Fix: hydate did not match when use SSG #5724
  • Fix: compile data-loader.js to lower es version #5758

v3.0.3

15 Dec 09:24
b70b95e
Compare
Choose a tag to compare

Configurate plugin to your ice.config.mts

import { defineConfig } from '@ice/app';
import icestark from '@ice/plugin-icestark';

export default defineConfig(() => ({
  plugins: [
    icestark({ type: 'framework' }),
  ],
}));

Visit readme for details.

  • Feat: support pha prefetch defined in dataLoader
  • Fix: optimize log and fix unhandled error makes HMR failed #5654 #5688
  • Fix: error url output when enable hash router #5678
  • Fix: VisibilityChange do not work with child element #5693
  • Fix: data loader when render mode is SSG #5682
  • Fix: process exit when error occur of mock file #5658

v3.0.2

08 Dec 06:45
fbe25b8
Compare
Choose a tag to compare
  • Fix: mainFields of server compiler #5626
  • Fix: chunk name rule of lazy page component #5655
  • Fix: format core-js path when config polyfill #5648
  • Fix: remove error import warning when config polyfill: usage #5650
  • Fix: failed to use env in ice.config.mts #5637
  • Fix: do not detect port which configured #5664

Visit RP for details.