Skip to content

Releases: alibaba/ice

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.

v3.0.1

29 Nov 07:10
3d8bcff
Compare
Choose a tag to compare
  • Feat: support multiple runtime entry of development #5596
  • Fix: external rule for director apis when pack server bundles #5572
  • Fix: reduce bundle size of data-loader #5577
  • Fix: optimize server bundles when development #5556
  • Fix: bump version of built-in dependencies, including @swc/core, webpack #5596
  • Fix: failed to get route config when re-define route path #5609
  • Fix: support custom config file #5622
  • Fix: add temp file to cache directory #5623
  • Fix: merge window content inject by component Script and Data #5630
  • Fix: file resolve when compile css in server compiler #5632
  • Refactor: lock pack dependencies in @ice/bundles, update swc plugins to reduce install size. #5616

v3.0.0

17 Nov 09:11
2dd157c
Compare
Choose a tag to compare

🎉🎉🎉 Announcement on ice.js 3.0, Visit 📚 Docs for details.

Core Changes

  • New runtime for react 18 and react-router v6
  • Pre-render pages at build time (SSG) or request time (SSR) for default
  • Improve user experience with features such as dataLoader, script prefetch and etc
  • Multi-End Support, both web, Miniapp and Weex
  • New plugin system provides rich features and allow the community to build reusable solutions
  • 2x faster update then ice.js 2.x in mode webpack
  • Full type support for both runtime and build config