Commit Graph

79 Commits

Author SHA1 Message Date
ClarkXia cc0792b0fd
feat: support custom props when render document (#7099)
CI / build (16.x, ubuntu-latest) (push) Waiting to run Details
CI / build (16.x, windows-latest) (push) Waiting to run Details
CI / build (18.x, ubuntu-latest) (push) Waiting to run Details
CI / build (18.x, windows-latest) (push) Waiting to run Details
Coverage / coverage (16.x) (push) Waiting to run Details
Release / Release (16) (push) Waiting to run Details
* feat: support custom props when render document

* Update packages/runtime/src/types.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/runtime/src/renderDocument.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: test case

* Update runServerApp.tsx

* fix: optimize props

* chore: optimize code

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-30 11:17:22 +08:00
Keith dcc100457f
fix: update es-module-lexer (#7050)
* fix: update es-module-lexer

* fix: ci
2025-02-20 18:07:41 +08:00
XGHeaven f0c6380b0c
feat: support htmlGeneratingMode option (#7032) 2024-12-12 16:34:48 +08:00
ClarkXia 15c8200f60
Feat: unnecessary to compile routes config for server render (#6856)
* fix: unnecessary to compile routes config for server render

* chore: format ejs template

* feat: support build fallback entry

* chore: add test case for fallback entry

* chore: update lock

* chore: changeset

* chore: lint

* chore: lint

* chore: remove console log

* fix: merge conflict

* fix: undefined assign
2024-06-17 16:24:57 +08:00
Homyee King 25c7584326
feat: dynamic API (#6831)
* chore: save

* feat: basic dynamic

* feat: export from ice/runtime

* test: with-dynamic

* test(with-dynamic): name export

* feat: use useMounted

* chore: cmt

* chore: up lock file

* chore: use universal-env

* fix: ci

* Revert "chore: use universal-env"

This reverts commit 98f5dff99f.

* chore: optimize logic
2024-03-20 14:44:21 +08:00
ClarkXia e3e1f27cba
fix: compatible with win32 in speedup mode (#6497)
* fix: compatible with win32 in speedup mode

* chore: comment
2023-08-30 13:29:18 +08:00
Linbudu bf8af99dea
remove plugin-rax-compat server options (#6362)
* fix: remove server options setter

* fix: remove server options setter

* feat: fixup tests

* fix: buildOptions compat
2023-07-06 11:00:14 +08:00
水澜 65680d4465
fix: inline style (#6167)
* fix: inline style

* fix: test for css modules

* chore: add changeset

* fix: support global css

* revert: version

* fix: version

* refactor: add option to config css module

* fix: default support css modules

* fix: default support css modules

* fix: lint
2023-05-01 23:44:28 +08:00
逆葵 c7ec3a43a8 Merge branch 'release/next' into feat/miniapp-native-events 2023-04-25 15:25:10 +08:00
水澜 f56497f694
feat: async data loader (#6137)
* chore: refactor unfinished

* feat: support create router

* refactor: render mode

* fix: code splitting false

* feat: add location for icestark

* chore: remove console

* test: examples

* fix: dataloader is undefined

* fix: test

* fix: test case

* fix: test case

* fix: types

* fix: test case

* fix: lock

* feat: async data loader

* fix: update lock

* fix: hydration

* fix: router

* fix: router

* chore: log

* fix: hmr

* fix: test

* fix: test

* feat: await

* fix: await component

* fix: lint

* refactor: type

* fix: type

* fix: app data loader

* fix: test

* fix: test

* test: async data

* test: async data

* docs: async data loader

* fix: lint

* refactor: loader config

* fix: test

* fix: compat with old useage

---------

Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
2023-04-25 10:47:40 +08:00
逆葵 c59b5f4c9e Merge branch 'release/next' into feat/miniapp-native-events 2023-04-24 18:05:57 +08:00
luhc228 1c3d3fec6c
feat: i18n plugin (#6149)
* feat: antd5 example with i18n

* feat: fusion example with i18n

* feat: init plugin-i18n

* feat: init i18n example

* chore: lock

* feat: add language selector

* feat: i18n route

* feat: getAllLocales and getDefaultLocale API

* fix: ssr render error

* feat: support auto redirect

* fix: redirect without url param

* feat: support add response handler

* chore: lock

* feat: support blockCookie option

* fix: route test

* fix: ssg error

* fix: i18n response

* feat: add server example

* chore: add basename

* chore: add headers

* feat: i18n docs

* fix: i18n plugin

* feat: enhance disable cookie

* docs: update disabledCookie documentation

* chore: update desc

* fix: param not defined

* fix: generate routes.ts

* fix: remove todo

* test: i18n

* test: i18n

* fix: lint warning

* fix: addDefineRoutesFunc to addRoutesDefinition

* chore: i18n plugin version

* chore: changelog

* feat: use modifyRenderData instead of runtimeOptions.raw

* chore: update changelog

* chore: rename param

* fix: comment

* feat: use createLogger instead of consola directly

* feat: change customRuntimeOptions type from string to object

* refactor: route id

* chore: remove unused console.log

* chore: add comment

* fix: win32 test fail

* chore: changelog
2023-04-24 10:18:53 +08:00
ClarkXia 4763bc7666
Refactor: router (#6123)
* chore: refactor unfinished

* feat: support create router

* refactor: render mode

* fix: code splitting false

* feat: add location for icestark

* chore: remove console

* test: examples

* fix: dataloader is undefined

* fix: test

* fix: test case

* fix: test case

* fix: types

* fix: test case

* fix: lock

* fix: update lock

* fix: hydration

* fix: router

* fix: router

* chore: log

* fix: hmr

* fix: test

* fix: test

* chore: optimize code

* Update singleRoute.test.tsx

* fix: types
2023-04-13 12:01:16 +08:00
逆葵 7840bd2c9b test(miniapp): add test case 2023-03-28 19:53:50 +08:00
逆葵 2d7d4bf1fc Merge branch 'master' into feat/miniapp-native-events 2023-03-28 11:40:52 +08:00
ClarkXia 4a73cb2ad2
fix: redirect named import (#6061)
* fix: redirect named import

* fix: test case

* fix: redirect request

* test: redirect request

* chore: add changeset

* feat: support get exports by target

* fix: type

---------

Co-authored-by: shuilan.cj <shuilan.cj@taobao.com>
2023-03-17 17:29:55 +08:00
水澜 dbff4d0b9d
fix: data loader error during navigate (#6044)
* fix: should reload data after navigate

* fix: lint

* chore: add changelog
2023-03-14 11:43:30 +08:00
ClarkXia b8e974393f
feat: support routes config (#5968)
* feat: support routes config

* fix: compatible with win32

* feat: add test case

* fix: optimize code

* fix: compatible with path

* Update routes.ts

* Update routes.ts
2023-02-28 10:00:43 +08:00
ClarkXia 1b6c57832a
feat: on-demand compilation for server (#5824)
* feat: node runner

* feat: node transform

* fix: unexpected modification

* fix: node runner

* test: test case

* test: test case

* test: test case

* fix: add dependencies

* fix: optimize code

* feat: server runner

* feat: optimize code

* fix: test case

* fix: test case

* feat: support on demand pre bundle

* chore: lint warning

* fix: optimize code

* fix: compile options

* fix: optimize code

* fix: add file

* fix: optimize code

* fix: test case

* fix: optimize code

* fix: test

* fix: compile target

* fix: optimize code

* fix: lint

* fix: optimize code
2023-02-22 12:17:31 +08:00
ClarkXia c893a64a1c
chore: changeset config (#5909)
* chore: reset version

* fix: changeset

* chore: publish beta

* chore: update pre

* chore: custom version

* chore: remove test

* fix: version

* chore: test case

* chore: version

* fix: reset changelog

* fix: update lock

* fix: changelog

* chore: release beta version

* chore: add changeset

* chore: release beta version

* chore: update @ice/app version

* chore: update version and lock

---------

Co-authored-by: luhc228 <luhengchang228@126.com>
2023-02-16 16:11:49 +08:00
ZeroLing 7c07f1654a
fix: data-loader using serverCompiler with renderer client (#5856)
* fix: data-loader using serverCompiler with renderer client

* fix: renderer
2023-02-02 20:07:49 +08:00
水澜 d2f0b7e5c7
feat: suspense ssr (#5584)
* feat: suspense ssr demo

* chore: rename global variable

* chore: update lock

* feat: suspense demo

* chore: delete dead code

* refactor: rename to data context

* fix: error triggered in steam, should not downgrade

* feat: suspense ssr

* fix: should async script when suspense

* feat: support suspense for common components

* feat: support suspense for common components

* fix: style type lint

* fix: typings

* feat: remove server data loader for suspense component

* feat: disable dataLoader for suspense

* chore: add style

* chore: add changelog

* chore: add changelog

* chore: add comments

* refactor: check suspense data

* fix: type

* test: suspnese

* fix: compat with ssg

* feat: fallback for suspense

* feat: suspense fallback

* refactor: pass id as props

* refactor: pass fallback as element

* fix: type

* docs: suspense

* docs: suspense

* refactor: support suspense in components

* fix: changelog

* fix: lint

* fix: should not replace env to string

* chore: add changelog

* chore: remove dead code

* revert: dataloader for ssr

* fix: lint

* refactor: rename

* docs: hide suspense ssr

* refactor: remove internal error boundary

* refactor: merge if condition

* fix: type

* refactor: suspense api

---------

Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
2023-02-02 16:00:04 +08:00
ZeroLing f46241fe75
Fix/compat rax element (#5847)
* fix: dynamic import works in app.tsx

* fix: test case

* chore: update depenedency version of @ice/webpack-config

* refactor: rax-compat jsx-runtime

* chore: add CHANGELOG and update version of rax-compat

* chore: pnpm lock up-to-date

* fix: puppteer update
2023-02-01 23:12:21 -08:00
ZeroLing acfc88427e
fix: dynamic import works in app.tsx (#5840)
* fix: dynamic import works in app.tsx

* fix: test case

* chore: update depenedency version of @ice/webpack-config

* chore: pnpm lock up-to-date
2023-02-02 14:22:35 +08:00
ClarkXia 66cd9df104
feat: enhance memory router (#5800)
* feat: enhance memory router

* fix: optimize code

* fix: error syntax

* fix: remove unused statement
2023-01-11 17:36:28 +08:00
ZeroLing f46d0e7204
feat: support target and renderer (#5700)
* feat: support target and renderMode

* fix: test case and renderer

* Update build.ts

* refactor: constant

* fix: eslint

* fix: remove empty line

* fix: remove useless code

* feat: add import.meta.env

* fix: type webpack

* fix: server compiler defines
2023-01-06 15:07:39 +08:00
水澜 f62ec86c50
fix: rerender ssg after hydrate (#5755)
* feat: update ssg data after hydrate

* v1.0.4

* test: ssg

* test: ssg

* chore: changelog

* revert: no optional

* fix: update app context

* refactor: call data loader in useEffect
2022-12-27 14:33:03 +08:00
ClarkXia 05aeb94f6b
feat: plugin for icestark (#5695)
* feat: plugin icestark arch

* feat: icestark child app

* chore: update type

* fix: icestark child

* feat: icestark layout

* feat: icestark framework

* feat: test case for icestark

* chore: changelog

* fix: optimize code

* fix: optimize code
2022-12-15 14:35:07 +08:00
ClarkXia 497b1f333f
fix: config polyfill of usage (#5663)
* fix: config polyfill of usage

* test: add test case

* fix: compatible with win32

* test: test case
2022-12-08 10:21:01 +08:00
ClarkXia 5f2433abd3
fix: pass a timeout value for long-running test (#5604)
* fix: pass a timeout value for long-running test

* fix: configure testTimeout
2022-11-22 16:43:03 +08:00
水澜 52eadfb309
feat: redirect imports (#5590)
* feat: redirect imports

* test: data loader size

* chore: change log

* chore: change log
2022-11-21 17:58:15 +08:00
ClarkXia e21fb48509 fix: release 3.0 2022-11-15 10:37:30 +08:00
染陌同学 36475937e8 Feat/define data loader (#643)
* feat: modify dataLoader

* feat: add type

* feat: add DataLoaderConfig

* feat: modify getData to defineDataLoader

* chore: remove defineDataLoader

* fix: fetcher shoule return promise

* fix: loader may be undefined

* fix: err loader config

* chore: modify example of pha

* feat: modify getData

* chore: modify type and mofiy options of init

* feat: modify fetcher to dataLoaderFetcher and add dataLoaderImport to entry

* chore: modify defaultDataLoaderFetcher

* chore: load data by route id

* feat: modify serverDataLoader and staticDataLoader

* feat: add fetcher when route change

* fix: deal with window undefined

* chore: modify type

* feat: try get data from cache

* feat: support useData

* feat: add defineStaticDataLoader and defineServerDataLoader

* chore: modify getData of example

* fix: should load data

* fix: fix ssg err

* fix: fix dataloader for ssg

* test: modify env of test

* fix: shoule clear cache when route changed

* fix: fix renderMode and add defult remder mode

* fix: add window

* test: add jsdom

* test: modify getData to dataLoader

* test: modify test of clientApp

* test: clear window after each test

* test: remove only

* test: remove only

* chore: modify appear

* fix: Try get data from cache when CSR

* chore: update lock

* chore: remove unused

* refactor: data loader (#685)

* refactor: set global fetcher

* refactor: set global fetcher

* fix: should not build react in data loader

* fix: test

* test: modify test

Co-authored-by: 水澜 <shuilan.cj@taobao.com>
Co-authored-by: ZeroLing <i@zeroling.com>
2022-11-15 10:33:11 +08:00
luhc228 e88c291ad1 fix: useAuth error (#661)
* chore: example

* chore: with-auth example

* docs: update auth

* test: add with-auth test

* chore: format

* fix: lock
2022-11-15 10:33:11 +08:00
ClarkXia 9f57caffb4 fix: duplicate assets in document output (#646)
* fix: duplicate assets in document output

* fix: add test case

* chore: typo
2022-11-15 10:33:11 +08:00
luhc228 7fe93e3503 feat: ClientOnly component (#542)
* feat: BrowserOnly Component

* docs: BrowserOnly component docs

* docs: optimize

* feat: export useIsBrowser Hook

* feat: useIsBrowser example

* docs: useIsBrowser

* docs: typo

* chore: clientOnly

* feat: ClientOnly and useMounted

* feat: add ClientOnly test

* docs: update docs

* feat: use hooks instead of Context

* chore: import name
2022-11-15 10:32:48 +08:00
luhc228 3f54369bff feat: store initialStates (#435)
* feat: store initialStates

* chore: update README

* chore: add file comment

* chore: rename type

* fix: peer dependencies

* fix: defineStoreConfig not found

* feat: support get the appData

* fix: test case

* fix: lock
2022-11-15 10:32:48 +08:00
ClarkXia 16b82337b2 fix: ignore with non-absoulte path (#566) 2022-11-15 10:32:43 +08:00
水澜 114373633f feat: build routes config for document render (#552)
* feat: render document by routes config

* test: downgrade to csr

* chore: rename

* refactor: load route modules after only in ssr

* fix: pha test

* fix: compat with no routes config

* fix: ensure routes config before build

* fix: test case

* fix: test timeout

* fix: cache in test case

* refactor: check routes config before server compiler

* refactor: allways generate routes config

* chore: remove dead code

* fix: reset status when init config
2022-11-15 10:32:43 +08:00
水澜 99d7f37fc5 refactor: generate data-loader only by getData (#514)
* refactor: generate data-loader only by getData

* feat: support config dataloader

* test: disable data-loader

* chore: rename

* docs: data loader

* chore: update lock
2022-11-15 10:32:43 +08:00
luhc228 c8b4db3cd4 test: fix routes-generate unit test timeout (#531)
* test: fix routes-generate timeout

* refactor: optimize page.push()
2022-11-15 10:31:55 +08:00
水澜 990f7aa552 feat: support inline style for ssr (#518)
* feat: inline style for less

* feat: classname to style

* feat: esbuild inline style

* feat: transform styles

* fix: compat for less module

* fix: less rule

* feat: ignore

* docs: ignore

* refactor: to ts

* test: inline-style

* chore: update lock

* fix: deps

* refactor: enable esbuild inline style loader only in ssr

* fix: validate for ignore plugins

* refactor: to pure functions

* feat: sync syntaxFeatures

* fix: lint

* Update rax-inline-style.test.ts
2022-11-15 10:31:35 +08:00
ClarkXia ad531405a8 test: improve test case (#497)
* test: improve test case

* test: compat win32

* test: test case

* test: add test case

* test: add test case

* test: test case for rax-compat

* test: test case for routes

* fix: types error

* fix: to strict equal

* chore: remove unused props

* fix: types

* test: test case for run client app

* chore: remove empty router

* test: test case of run server app

* chore: remove log

* chore: do not remove file by test case

* fix: remove document dependency when run client app

* chore: lint

* chore: remove config

* fix: lint

* chore: lint warning

* fix: test case

* chore: update unplugin
2022-11-15 10:30:52 +08:00
luhc228 41aee63512 feat: add splitChunks to userConfig (#454)
* feat: add splitChunks to userConfig

* docs: splitChunks

* test: splitChunks test case

* fix: splitChunk test case
2022-11-15 10:27:46 +08:00
水澜 f384a2043d fix: remove component in csr (#486)
* fix: remove component in csr

* fix: keep export default for app

* fix: should load route modules first to get config
2022-11-15 10:27:46 +08:00
luhc228 47738dca66 fix: rax project ssr failed (#467)
* fix: prebundle alias

* fix: rax multiple version

* fix: test case

* chore: rename param
2022-11-15 10:27:46 +08:00
ClarkXia 11a58ed9ae fix: compatible with win32 system (#477)
* fix: compatible with win32

* fix: lint

* chore: optimize code

* fix: test case

* fix: build-scripts version

* chore: update version

* chore: update lock file

* feat: add test case of win

* fix: node matrix

* fix: format path

* fix: win32 compatible

* fix: format path
2022-11-15 10:27:42 +08:00
ClarkXia aa248063ef feat: support optimize router (#456)
* feat: support optimize router

* feat: export useNavigate

* chore: remove useless code
2022-11-15 10:27:18 +08:00
luhc228 2ca66f5857 feat: store plugin (#431)
* feat: app store

* chore: store example

* chore: lock

* feat: init page store

* feat: update page store

* fix: disable reset page state

* feat: createModel

* test: with-store test

* fix: comment

* chore: lock
2022-11-15 10:23:01 +08:00
luhc228 be13ee9dd8 fix: hash router preview (#393)
* feat: init example

* fix: can not render component

* chore: lock

* feat: test case

* fix: comment

* fix: test error

* fix: test case

* fix: not use the correct location in hash router

* chore: remove appConfig param

* chore: remove AppConfig type
2022-11-15 10:20:02 +08:00