mirror of https://github.com/alibaba/ice.git
Compare commits
4 Commits
fa1aead690
...
6cd89a18af
Author | SHA1 | Date |
---|---|---|
|
6cd89a18af | |
|
22b10c0d1c | |
|
cc0792b0fd | |
|
80250ffe6e |
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'@ice/appear': patch
|
||||
---
|
||||
|
||||
fix appear event handler callback refs in WeexAppear component
|
|
@ -1,5 +1,11 @@
|
|||
# @ice/appear
|
||||
|
||||
## 0.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 451839c5: fix appear event handler callback refs in WeexAppear component
|
||||
|
||||
## 0.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@ice/appear",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"description": "",
|
||||
"main": "./esm/index.js",
|
||||
"types": "./esm/index.d.ts",
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
# Changelog
|
||||
|
||||
## 3.6.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- cc0792b0: fix: minify server bundle when build in prod
|
||||
- Updated dependencies [cc0792b0]
|
||||
- @ice/runtime@1.5.3
|
||||
|
||||
## 3.6.2
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@ice/app",
|
||||
"version": "3.6.2",
|
||||
"version": "3.6.3",
|
||||
"description": "provide scripts and configuration used by web framework ice",
|
||||
"type": "module",
|
||||
"main": "./esm/index.js",
|
||||
|
|
|
@ -184,6 +184,7 @@ export function createServerCompiler(options: Options) {
|
|||
// while it is not recommended
|
||||
loader: { '.js': 'jsx' },
|
||||
jsx: 'automatic',
|
||||
minify: !dev,
|
||||
sourcemap: typeof sourceMap === 'boolean'
|
||||
// Transform sourceMap for esbuild.
|
||||
? sourceMap : (sourceMap.includes('inline') ? 'inline' : !!sourceMap),
|
||||
|
|
|
@ -59,6 +59,7 @@ interface RenderOptions {
|
|||
publicPath?: string;
|
||||
serverData?: any;
|
||||
streamOptions?: RenderToPipeableStreamOptions;
|
||||
documentProps?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export async function renderToHTML(requestContext, options: RenderOptions = {}) {
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# @ice/miniapp-react-dom
|
||||
|
||||
## 1.1.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @ice/miniapp-runtime@1.2.4
|
||||
|
||||
## 1.1.3
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@ice/miniapp-react-dom",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"description": "like react-dom, but for miniapps.",
|
||||
"type": "module",
|
||||
"types": "./esm/index.d.ts",
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
# Changelog
|
||||
|
||||
## 1.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [cc0792b0]
|
||||
- @ice/runtime@1.5.3
|
||||
|
||||
## 1.2.3
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@ice/miniapp-runtime",
|
||||
"version": "1.2.3",
|
||||
"version": "1.2.4",
|
||||
"description": "ice runtime for miniapps.",
|
||||
"type": "module",
|
||||
"types": "./esm/index.d.ts",
|
||||
|
|
|
@ -56,8 +56,8 @@
|
|||
"webpack-dev-server": "4.15.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ice/app": "^3.6.2",
|
||||
"@ice/runtime": "^1.5.2"
|
||||
"@ice/app": "^3.6.3",
|
||||
"@ice/runtime": "^1.5.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
# Changelog
|
||||
|
||||
## 1.2.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @ice/miniapp-runtime@1.2.4
|
||||
- @ice/miniapp-react-dom@1.1.4
|
||||
|
||||
## 1.2.4
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@ice/plugin-miniapp",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.5",
|
||||
"description": "ice.js plugin for miniapp.",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
|
@ -50,8 +50,8 @@
|
|||
"sax": "^1.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ice/app": "^3.6.2",
|
||||
"@ice/runtime": "^1.5.2",
|
||||
"@ice/app": "^3.6.3",
|
||||
"@ice/runtime": "^1.5.3",
|
||||
"webpack": "^5.88.0"
|
||||
},
|
||||
"repository": {
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# @ice/runtime
|
||||
|
||||
## 1.5.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- cc0792b0: feat: support custom props when render document
|
||||
|
||||
## 1.5.2
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@ice/runtime",
|
||||
"version": "1.5.2",
|
||||
"version": "1.5.3",
|
||||
"description": "Runtime module for ice.js",
|
||||
"type": "module",
|
||||
"types": "./esm/index.d.ts",
|
||||
|
|
|
@ -45,6 +45,7 @@ export function renderDocument(options: RenderDocumentOptions): Response {
|
|||
basename,
|
||||
routesConfig = {},
|
||||
serverData,
|
||||
documentProps,
|
||||
} = renderOptions;
|
||||
|
||||
const appData = null;
|
||||
|
@ -84,7 +85,7 @@ export function renderDocument(options: RenderDocumentOptions): Response {
|
|||
<AppContextProvider value={appContext}>
|
||||
<DocumentContextProvider value={documentContext}>
|
||||
{
|
||||
Document && <Document pagePath={routePath} />
|
||||
Document && <Document pagePath={routePath} {...documentProps} />
|
||||
}
|
||||
</DocumentContextProvider>
|
||||
</AppContextProvider>,
|
||||
|
|
|
@ -283,7 +283,7 @@ async function renderServerEntry(
|
|||
renderOptions,
|
||||
}: RenderServerEntry,
|
||||
): Promise<Response> {
|
||||
const { Document } = renderOptions;
|
||||
const { Document, documentProps } = renderOptions;
|
||||
const appContext = runtime.getAppContext();
|
||||
const { routes, routePath, loaderData, basename } = appContext;
|
||||
const AppRuntimeProvider = runtime.composeAppProvider() || React.Fragment;
|
||||
|
@ -307,7 +307,7 @@ async function renderServerEntry(
|
|||
<AppRuntimeProvider>
|
||||
<DocumentContextProvider value={documentContext}>
|
||||
{
|
||||
Document && <Document pagePath={routePath} />
|
||||
Document && <Document pagePath={routePath} {...documentProps} />
|
||||
}
|
||||
</DocumentContextProvider>
|
||||
</AppRuntimeProvider>
|
||||
|
|
|
@ -338,6 +338,7 @@ export interface RenderOptions {
|
|||
runtimeOptions?: Record<string, any>;
|
||||
serverData?: any;
|
||||
streamOptions?: RenderToPipeableStreamOptions;
|
||||
documentProps?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
|
|
@ -2157,10 +2157,10 @@ importers:
|
|||
version: 1.2.4
|
||||
devDependencies:
|
||||
'@ice/app':
|
||||
specifier: ^3.6.2
|
||||
specifier: ^3.6.3
|
||||
version: link:../ice
|
||||
'@ice/runtime':
|
||||
specifier: ^1.5.2
|
||||
specifier: ^1.5.3
|
||||
version: link:../runtime
|
||||
webpack:
|
||||
specifier: ^5.88.0
|
||||
|
|
|
@ -20,7 +20,7 @@ describe(`build ${example}`, () => {
|
|||
sizeFallback = fs.statSync(fallbackPath).size;
|
||||
|
||||
expect(sizeFallback).toBeLessThan(sizeServer);
|
||||
// The Stat size of fallback entry will reduce more than 50kb.
|
||||
expect(sizeServer - sizeFallback).toBeGreaterThan(50 * 1024);
|
||||
// The Stat size of fallback entry will reduce more than 50kb, minify size is 20kb.
|
||||
expect(sizeServer - sizeFallback).toBeGreaterThan(20 * 1024);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue