Releases: alibaba/ice
Releases · alibaba/ice
v3.1.2
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.
- Feat: support code spiliting strategy #5957
- Fix: usage of plugin request #5922 @luhc228
- Fix: do not compile non-js file when use plugin fusion #5937
- Fix: support unknown cli options registered by plugins #5989
- Fix: import path of types and runtime #5981
- Fix: compile error when declare
@jsx createElement
comment. Thanks for the PR from @MrpandaLiu - Fix: serveral problems when use stream render #5986 #5985 #5984 #5983 #5987 #5988 @chenjun1011
- Fix: props transformation when use
rax-compat
#5999 - Fix: break change for plugin PHA #5955 #5913 @answershuto
v3.1.1
- Feat: support API for get route manifest
getRouteManifest
and flatten routesgetFlattenRoutes
#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 compiledataLoader.js
#5897 - Fix: optimize terminal log #5912 #5859
v3.1.0
- 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
- Feat: support
import.meta.target
,import.meta.renderer
andimport.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
v3.0.4
- 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
- Feat: plugin for icestark
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
- 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
- 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
andData
#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
🎉🎉🎉 Announcement on ice.js 3.0
, Visit 📚 Docs for details.
Core Changes
- New runtime for
react 18
andreact-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