github alibaba/ice @ice/app@3.1.2
v3.1.2

latest releases: @ice/app@3.4.12, @ice/plugin-stream-error@1.0.2, @ice/webpack-config@1.1.16...
20 months ago

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.

Don't miss a new ice release

NewReleases is sending notifications on new releases.