ice

🚀 ice.js: The Progressive App Framework Based On React(基于 React 的渐进式应用框架)

MIT License

Downloads
17.2K
Stars
17.8K
Committers
83

Bot releases are hidden (Show)

ice - v3.3.1

Published by ClarkXia about 1 year ago

  • Ignore static resource when render server entry #6484
  • Runtime in document should compat with old browsers #6478
  • Fix typo of app data specifier which cause twice request of app data loader #6480
  • Bump dependencies version including @swc/core, rspack #6501
  • Compatible with win32 when enable --speedup #6497
  • Mark polyfill signal as es module, so it won't break the compilation #6500
ice - v3.3.0

Published by ClarkXia about 1 year ago

  • 🎉 Support new bundler (rspack) to speed up both local development, as well as production builds.

Enable feature through ice start --speedup:

{
  "scripts": {
    "start": "ice start --speedup",
    "build": "ice build --speedup"
  },
}
  • 🎉 Update plugin and compiler tools based on Rust, improve compile time.
ice - v3.2.10

Published by ClarkXia about 1 year ago

  • Fix HMR failed when export pageConfig or dataLoader in page routes #6442
  • Compatible with Win32 when onDemand compiling is enabled #6466
  • Support define route with absolute path
import { defineConfig } from '@ice/app';

export default defineConfig({
  routes: {
    defineRoutes: (route) => {
      // Limitation: about.tsx should locate in root dir
      route('/hello', '/absolute/path/to/about.tsx');
    },
  },
});
  • Add exports of service for node API
// Support Node API for other build tools.
import createService from '@ice/app/service';
const service = createService({ rootDir: '', command: 'start', commadArgs: {} });
service.run();
ice - v3.2.9

Published by ClarkXia about 1 year ago

// Export runApp in `src/app.ts` allows to customize render options
export const runApp = (render, option) => {
  render();
};
ice - v3.2.8

Published by ClarkXia about 1 year ago

  • Feat: support to remove react-router even route count is greater than 1 #6382
import { defineConfig } from '@ice/app';
// Remove react-router in case of render page like MPA mode.
export default defineConfig(() => ({
  optimization: { disableRouter: true },
}));
  • Feat: enhance dropLogLevel config, support specify array of drop level #6376
import { defineConfig } from '@ice/app';

export default defineConfig(() => ({
  dropLogLevel: ['trace', 'warn'],
}));
  • Feat: support new code splitting strategy page-vendors #6386
import { defineConfig } from '@ice/app';

export default defineConfig(() => ({
  codeSplitting: 'page-vendors',
}));
  • Feat: support function to specify modules with inline style #6380
  • Feat: new API for cache canvas #6367
  • Fix: always external dependencies when get app config #6383
  • Fix: format dataLoader config in PHA plugin #6384
  • Fix: do not compile runtime library such as tslib #6377
ice - v3.2.7

Published by ClarkXia over 1 year ago

  • Feat: support htmlGenerating to control html generation #6346
export default defineConfig(() => ({
  // Configrate htmlGenerating to disable html generation.
  htmlGenerating: false,
});
  • Fix: alias for type declaration #6360
  • Fix: compilation config not extended #6342
  • Fix: add warning log for mutate suspense data directly #6351
  • Chore: add user config comments #6347
    image
  • Fix: relative id in pipe transform #6340
  • Fix: compile error when use plugin-rax-compat #6362
ice - v3.2.6

Published by ClarkXia over 1 year ago

  • Feat: support document API usePageAssets #6238
  • Fix: load route module error when only has one router #6297
  • Fix: task alias not be consumed #6296
  • Fix: compat with streaming api in miniapp #6268 @hzyhbk
  • Fix: replace history methods by router navigate for backwards compatibility #6317
  • Fix: refactor error handling and update error overlay #6286
  • Fix: server dataLoader error #6316
  • Fix: client send extra useless requests in render mode SSR #6307 @malei0311
  • Fix: support source map for stack trace in node #6322
  • Fix: single router optimization #6310
import { defineConfig } from '@ice/app';
export default defineConfig(() => ({
  // Active feature by config optimization.router `true`
  optimization: {
    router: true,
  },
}));
ice - v3.2.5

Published by ClarkXia over 1 year ago

ice - v3.2.4

Published by ClarkXia over 1 year ago

  • Fix: compile @remix-run/router when minify is swc
  • Fix: compat style for rax-compat mode
ice - v3.2.3

Published by ClarkXia over 1 year ago

  • Feat: support stream options for pipeable render #6285
  • Fix: reject error when shell error in SSR #6278
  • Fix: add default polyfill for some browser do not have signal in instance of Request #6273
  • Fix: getRoutesFile is undefined when use onDemand server render #6270
ice - v3.2.2

Published by ClarkXia over 1 year ago

  • Fix: compatible with code has import.meta #6264
  • Fix: import identifier is invalid in route config #6265
ice - v3.2.1

Published by ClarkXia over 1 year ago

  • Feat: support sourcemap of js entry
  • Feat: support api of addEntryImportAhead (#6256)
  • Fix: import store source before swc compiler (#6248)
  • Fix: history import from ice do not work
  • Fix: use data get undefined value
ice - v3.2.0

Published by ClarkXia over 1 year ago

  • Refactor: core runtime of router #6123
  • Refactor: remove babel dependencies for remove code #6144
  • Feat: support version check of framework #6151
  • Feat: support defer data loader #6137
  • Feat: i18n Close #6050 close #5965
  • Feat(miniapp): support app and page native events
  • Fix: remove all exports of routes when render mode is csr #6140
  • Fix: enable type=module to rax-compat #6176
  • Fix: route specifier is invalid #6195
  • Fix: dataLoader is sent repeatedly in PHA #6063
  • Fix: possible standard properties
  • Fix: compat with rax state #6165
  • Fix: support inline style config for plugin rax-compat
  • Fix: compatible with runtime absolute path on win32 #6162
ice - v3.1.7

Published by ClarkXia over 1 year ago

  • Feat: support match target entry to bundle #6200
  • Feat: support case of import module with aliased name #6205
  • Fix: parsing url path properly #6212
  • Fix: style props convert error #6215
  • Fix: define rule of user Config #6198
  • Chore: bump @swc/helpers version(0.5.1)
ice - v3.1.6

Published by ClarkXia over 1 year ago

Patch: revert @swc/core version because of https://github.com/swc-project/swc/issues/7174

ice - v3.1.5

Published by ClarkXia over 1 year ago

  • Fix: get route assets by route manifest #6083 Close #6078
  • Fix: compatible with undefined value in PHA template #6082 Close #6081
  • Fix: onAppear is undefined in rax-compat mode #6076 Close #6072
  • Chore: env compatible with default export #6095
  • Fix: refactor get route paths for remove unused code #6074 Close #6066
  • Feat: support pullrefresh in PHA #6121 Close #6117
  • Chore: update dependencies #6026
ice - v3.1.4

Published by ClarkXia over 1 year ago

  • 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
ice - v3.1.3

Published by ClarkXia over 1 year ago

  • 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
ice - v3.1.2

Published by ClarkXia over 1 year ago

  • Feat: support on demand compilation for server code #5823 #5780 @ClarkXia

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
ice - v3.1.0

Published by ClarkXia over 1 year ago

  • 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
Package Rankings
Top 1.21% on Npmjs.org
Related Projects