Releases: alibaba/ice
Releases · alibaba/ice
v3.1.4
v3.1.3
- 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
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.