🚀 ice.js: The Progressive App Framework Based On React(基于 React 的渐进式应用框架)
HotFix: the judgment of unsupported syntax #6646
plugin-store
will works properly.data-loader
, cont-and-let
will be transformed if necessary.@ice/app
export fields support #6544configureWebpack
in speedup mode #6564import { defineConfig } from '@ice/app';
export default defineConfig(() => ({
cssModules: {
localIdentName: '[hash:8]',
},
}));
import { defineConfig } from '@ice/app';
import streamError from '@ice/plugin-stream-error';
export default defineConfig(() => ({
plugins: [
streamError(),
],
}));
--speedup
#6497rspack
) 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"
},
}
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');
},
},
});
// Support Node API for other build tools.
import createService from '@ice/app/service';
const service = createService({ rootDir: '', command: 'start', commadArgs: {} });
service.run();
// Export runApp in `src/app.ts` allows to customize render options
export const runApp = (render, option) => {
render();
};