Commit Graph

381 Commits

Author SHA1 Message Date
ClarkXia b691b9e96c
feat: support remove router even if route count is greater than 1 (#6382)
* feat: support remove router even if route count is greater than 1

* fix: add test case

* Update createService.ts

* Update createService.ts
2023-07-18 15:20:26 +08:00
ClarkXia 76ef029d0c
chore: update versions (#6368) 2023-07-06 16:41:48 +08:00
ClarkXia 29ad1b5242
fix: add warning log for mutate suspense data directly (#6351) 2023-07-05 14:30:16 +08:00
ClarkXia 45fbf7d5d7
chore: update versions (#6300) 2023-06-16 10:07:54 +08:00
ClarkXia 9d50f5fcdc
fix: deprecated warning for use app context form @ice/runtime (#6325)
* fix: deprecated warning for use app context form @ice/runtime

* fix: test case
2023-06-14 19:03:08 +08:00
染陌同学 9eec33ad21
feat: support weex start sourcemap (#6315)
* feat: support weex start sourcemap

* chore: add changeset
2023-06-14 11:12:52 +08:00
ClarkXia c4f625a22e
fix: single router optimization (#6310)
* fix: optimize single router

* chore: changelog

* fix: test case

* fix: optimize code
2023-06-13 11:23:40 +08:00
水澜 137d6b1c99
fix: server dataLoader error (#6316)
* fix: server error

* chore: add changelog

* fix: fallback should be optional

* chore: add changelog
2023-06-13 11:23:18 +08:00
ClarkXia c68c5da305
fix: replace history methods by router navigate for backwards compatibility (#6317) 2023-06-12 16:35:53 +08:00
Lei Ma effe79860c
fix(runtime): when SSR client send extra useless requests (fix #6306) (#6307)
detail: SSR compile time data field 'loaderData' not match runtime 'routesData'
2023-06-07 16:51:09 +08:00
ClarkXia 87dd2a9434 Merge branch 'release/next' of github.com:alibaba/ice into release/next 2023-06-07 14:54:55 +08:00
ClarkXia 234245e1bd
chore: update versions (#6305) 2023-06-07 13:35:14 +08:00
ClarkXia ed4ed7ee7a
hotfix: auto polyfill for abortcontroller (#6301)
* fix: auto polyfill for abortcontroller

* fix: polyfill

* feat: changelog

* fix: lint

* fix: optimize code

* fix: signal
2023-06-07 11:26:01 +08:00
luhc228 af0a6d7ad3
fix: route paths are not match with hash (#6304)
* fix: bump react-router version to fix route path not match with location hash

* chore: changeset
2023-06-07 11:07:41 +08:00
水澜 474e19356f
feat: use scripts (#6238)
* feat: build for production

* feat: use scripts

* revert: production config

* feat: use render mode

* test: use scripts

* fix: export

* fix: exports

* fix: lint

* revert: lock

* feat: export useAppContext

* fix: type

* fix: type

* refactor: hooks name

* fix: type

* refactor: remove useRenderMode

* refactor: remove useRenderMode

* refactor: function name

* fix: export app config

* refactor: app context

* chore: add changelog

* chore: remove demo code
2023-06-05 16:01:11 +08:00
luhc228 f839c67d7a
fix: load route module error when only has one router (#6297)
* fix: loadRouteModule error when only has one router

* chore: changeset
2023-06-05 14:01:16 +08:00
ClarkXia 45bb4620c4
chore: update versions (#6276) 2023-05-31 15:41:55 +08:00
水澜 51411c4e67
feat: onShellReady (#6285)
* feat: onShellReady

* revert: version

* chore: add chagnelog

* revert: version

* revert: version

* feat: hooks for render

* fix: type

* refactor: stream options
2023-05-31 14:31:28 +08:00
ClarkXia 62a26e38f3
fix: add sideEffects config for polyfills (#6282) 2023-05-30 13:50:42 +08:00
水澜 d1df9ffa4c
fix: ssr error handle (#6278)
* fix: ssr error handle

* chore: add changelog
2023-05-29 14:25:06 +08:00
ClarkXia 71f32f9c85
fix: add default polyfill for signal (#6273)
* fix: add default polyfill for signal

* chore: changelog

* chore: lint
2023-05-25 19:04:03 +08:00
ClarkXia 542d86c75a
chore: update versions (#6250)
* chore: update versions

* Update CHANGELOG.md
2023-05-23 16:04:53 +08:00
水澜 6e639dfe0c
fix: use data (#6254)
* fix: use data

* fix: test

* chore: changeset

* fix: test

* chore: update lock
2023-05-19 11:08:25 +08:00
ClarkXia 989e250104
fix: compatible with hmr when data get undefined (#6259) 2023-05-19 10:02:10 +08:00
ClarkXia ab139accf0
fix: use api history to navigate (#6251)
* fix: use api history to navigate

* fix: params
2023-05-18 15:06:08 +08:00
染陌同学 f24b045de9
Feat/support sourcemap (#6158)
* feat: add generateSourceMap

* feat: generate souce map

* chore: add changeset

* feat: add data-sourcemap

* feat: add with-entry-type example

* feat: add sourcemap info

* fix: modify toJson to toString

* chore: rename generate sourcemap

* feat: modify line of child map

* feat: add base line

* chore: modify BASE_COLUMN

* chore: modify pnpm lock

* feat: data-sourcemap should be delete

* chore: update lock

* chore: add changeset

* chore: modify lock

* chore: remove app worker and data loader

* chore: if sourceMapFileList is empty, return empty string

* feat: support sourcemap meta

* feat: dealwith style

* feat: add prependCode

* chore: modify package

* chore: modify if
2023-05-17 20:01:34 -07:00
ClarkXia 8176bce92e
chore: add version check (#6240) 2023-05-16 18:15:09 +08:00
ClarkXia d173faeef4
fix: changelog (#6244) 2023-05-16 17:42:51 +08:00
luhc228 076a64fc2a
fix: basename not prepend (#6241)
* fix: basename not prepend

* fix: type

* fix: type

* fix: this bind
2023-05-16 17:24:22 +08:00
染陌同学 a878225f59
fix: fix dataLoader is sent repeatedly in PHA (#6062)
* fix: fix dataLoader is sent repeatedly in PHA

* chore: add changeset

* chore: add default wrapper for entry clinet

* feat: add init function to dataLoaderWrapper

* chore: modify number

* feat: modify decorator

* chore: modify decorator

* chore: add no unused vars
2023-05-16 02:10:01 -07:00
ClarkXia 68a95ab8c6
chore: update versions (#6147) 2023-05-16 16:06:21 +08:00
ClarkXia 9c801f6241
fix: bump version of react-router (#6223)
* fix: bump version of react-router

* fix: property of errorElement
2023-05-15 11:35:41 +08:00
ClarkXia d927acb577 Merge branch 'master' into release/next 2023-05-10 14:34:55 +08:00
ClarkXia c9766245d1
fix: test case after merge (#6224) 2023-05-10 14:19:30 +08:00
ClarkXia 5db5b662ec
fix: use import.meta.renderer for client judgement (#6222)
* fix: use import.meta.renderer for client judgement

* chore: changelog
2023-05-10 14:13:00 +08:00
ClarkXia a8e1c971d9
hotfix: parsing url path without using URL (#6225)
* fix: parsing url path without using URL

* fix: rule
2023-05-09 17:34:46 +08:00
ClarkXia 07687cc157 Merge branch 'master' into release/next 2023-05-09 15:34:11 +08:00
ClarkXia d77e216f3a
chore: update versions (#6202) 2023-05-09 14:20:53 +08:00
ZeroLing bb07fd9198
Fix/parse path (#6214)
* fix: parsePath to parseUrl

* test: add test for full url

* chore: add changeset
2023-05-06 05:49:07 -07:00
逆葵 39b66b27fb fix: lint warning 2023-04-26 14:51:38 +08:00
ClarkXia 753845c321
chore: update versions (#6193) 2023-04-25 16:21:41 +08:00
ClarkXia cd7c6c72be
fix: encode route path to escape xss (#6191) 2023-04-25 16:00:19 +08:00
逆葵 c7ec3a43a8 Merge branch 'release/next' into feat/miniapp-native-events 2023-04-25 15:25:10 +08:00
ClarkXia a164ec0d10
fix: coerce beta version into semver (#6185) 2023-04-25 11:37:18 +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 9de09ee8da
feat: support version check between @ice/app and @ice/runtime (#6151)
* feat: support version check between @ice/app and @ice/runtime

* fix: update lock
2023-04-14 11:04: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
逆葵 f79764a5b0 Merge branch 'release/next' into feat/miniapp-native-events 2023-04-10 16:17:05 +08:00
ClarkXia be9816f996
chore: update versions (#6089)
* chore: update versions

* Update CHANGELOG.md

* Update CHANGELOG.md
2023-03-30 13:22:49 +08:00
逆葵 925d186dd8 chore: update package.json 2023-03-29 11:00:41 +08:00
逆葵 b1bfef0ca9 Merge remote-tracking branch 'origin/release/next' into feat/miniapp-native-events 2023-03-28 15:05:11 +08:00
逆葵 2d7d4bf1fc Merge branch 'master' into feat/miniapp-native-events 2023-03-28 11:40:52 +08:00
ClarkXia 764ef0b612
fix: get route assets by route manifest (#6083) 2023-03-23 14:42:16 +08:00
ClarkXia ee4141d5c3
chore: update dependencies (#6026)
* chore: update dependencies

* chore: remove empty line

* chore: update swc version

* Revert "chore: update swc version"

This reverts commit 47c62bbe56.

* fix: update lock

* chore: update lock

* fix: bump @swc/core and swc plugins version

* chore: update changelog

* chore: update changelog

* fix: update lock
2023-03-21 17:00:31 +08:00
染陌同学 f519338c0a
Fix/parse template undefined (#6082)
* fix: parse template should return emply string when can't find

* chore: add changeset
2023-03-20 11:02:21 +08:00
ClarkXia b119e346e7
chore: update versions (#6005)
* chore: update versions

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md
2023-03-16 13:29:42 +08:00
ClarkXia 5486810915
fix: add leading slash for basename (#6058)
* fix: add leading slash for basename

* chore: changelog

* chore: changelog

* fix: test case

* fix: optimize code
2023-03-15 17:47:25 +08:00
染陌同学 2f4e64b26f
Fix/data loader err await (#6056)
* fix: getData should not block a reject state request

* chore: add changeset

* chore: modify message of error
2023-03-15 12:08:11 +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
github-actions[bot] e3ca513f56
chore: update versions (#5949)
* chore: update versions

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

---------

Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
2023-03-02 13:55:59 +08:00
水澜 7d7296975c
fix: stream render (#5956)
* fix: resolve after render

* fix: basename without /

* fix: request path

* fix: error order

* feat: support pass manifest

* feat: exports analyze

* chore: update lock

* fix: should keep state when rerender

* feat: request ctx for suspense

* fix: type

* feat: support pass server data

* revert: version

* chore: add changeset

* fix: lint

* fix: type

* chore: add comments

* chore: add comments

* chore: print error separately

* refactor: support runtime public path

* revert: export assets manifest
2023-03-01 18:02:39 +08:00
染陌同学 c6b70bcec7
fix: should not build html file when distType has not html (#5994)
* fix: should not build html file when distType has not html

* chore: add default value for distType
2023-03-01 01:02:37 -08:00
ClarkXia 56fb406e8a
fix: import path of types and runtime (#5981)
* fix: import path of types and runtime

* chore: package.json

* chore: add changelog

* fix: typings

* fix: type declare
2023-02-28 15:08:10 +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
github-actions[bot] a20807b473
chore: update versions (#5930)
* chore: update versions

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
2023-02-20 11:15:53 +08:00
luhc228 8eee4f0dc9
fix: prebundle esm module error (#5935)
* fix: prebundle esm module error

* fix: test case error

* chore: changeset

* chore: release beta version

* chore: remove unused code and deps

* chore: update comment

* chore: remove debugger

* chore: changeset

* chore: release beta version
2023-02-20 10:22:46 +08:00
染陌同学 67d68a15cf
feat: add type for runtime (#5934)
* feat: add type for runtime

* chore: types is not must

* chore: remove console

* feat: add TargetDeclarationData

* chore: document type should export by runtime

* fix: add isDeclarationData

* chore: add DeclarationType

* chore: modify type

* test: modify test

* chore: modify type

* feat: add Omit

* chore: dealwith warning
2023-02-17 00:20:54 -08:00
luhc228 db495382b2
feat: use changeset to publish and version (#5864)
* feat: add changesets config

* chore: remove version publish scripts

* chore: update ci workflow

* chore: update checkout branch step

* chore: lock

* fix: lost scripts

* fix: ts type error

* chore: remove scripts

* chore: update README

* chore: update lock

* chore: update dependency and script

* chore: remove version check

* chore: add publishConfig to package.json

* chore: update ci step

* chore: update release:beta script

* chore: add private field to examples

* chore: remove registry

* chore: update lock

* chore: update ci workflow

* chore: update workflow

* chore: update README

* chore: update changeset README

* chore: update cache key

* feat: update cache

* chore: update cache config
2023-02-13 14:48:34 +08:00
ZeroLing ef7657fde3
chore: update @ice/jsx-runtime usage (#5865)
* chore: update usage of jsx-runtime

* fix: pnpm lock file

* fix: jsx dev exports file

* chore: bump valid version

* chore: update jsx-runtime
2023-02-10 10:17:52 +08:00
染陌同学 eb9c562039
chore: Not parse template in SSG/SSR (#5853) 2023-02-02 18:32:53 +08:00
ClarkXia 39b181d54d
chore: changelog (#5849) 2023-02-02 17:45:34 +08:00
水澜 23f4d86bf4
refactor: html to js (#5838)
* refactor: html to js

* fix: config

* revert: keep renderToEntry

* fix: types

* refactor: simplify dist type

* chore: changelog
2023-02-02 16:47:16 +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
ClarkXia b92b26bdb6
fix: compatible with empty meta element (#5816)
* fix: compatible with empty meta element

* fix: add warning log
2023-02-01 11:23:14 +08:00
ZeroLing 8a94c4b503 Merge branch 'master' into release/3.1.0 2023-01-13 16:39:56 +08:00
ClarkXia 8ef77037ac
Merge pull request #5784 from alibaba/release/3.0
Release 3.0.6
2023-01-12 15:48:05 +08:00
ZeroLing 9f2ee217c2 Merge branch 'release/3.0' into release/3.1.0 2023-01-12 13:57:41 +08:00
ClarkXia b551b33e33
chore: changelog (#5813)
* chore: changelog

* chore: version
2023-01-11 18:41:37 +08:00
LeoYuan 袁力皓 a48d8ceb0e
chore: optimize error display (#5811) 2023-01-11 18:21:33 +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 08e1eed8fc
Refactor part of web plugin into common logic. (#5807)
* feat: modify generateHtml to generateEntry

* feat: support entry

* chore: update lock

* feat: support extra script

* feat: add config for entry

* feat: support entryType

* feat: add documentToJs

* feat: remove ejs to template

* chore: modify entry to output

* feat: add dom render

* chore: update lock

* chore: should publish templates

* feat: modify type and merge config

* feat: remove setConfig for output

* chore: modify jsOutput

* feat: add paths of outputs

* fix: should get data when after.start.compile

* feat: support dev

* feat: modify dist type

* chore: modify htmlOutput

* fix: modify dirname

* chore: modify dirname

* chore: add type for __ICE__CREATE_ELEMENT

* test: add test for domRender

* feat: add renderToHTML

* chore: modify platform

* feat: support target and renderMode

* fix: test case and renderer

* chore: update lock

* Update build.ts

* chore: add default value to urls

* refactor: constant

* feat: add with weex

* chore: change multi target

* fix: output orders

* fix: build order

* feat: modify disttype

* feat: modify textContent to support styleElement in weex

* fix: dist type javascript

* chore: version change

* fix: merge and versions

* fix: target renderer

* chore: remove with weex example

* fix: add commandArgs defaults for target, rename miniapp platforms to targets

* fix: bundle slash

Co-authored-by: answershuto <answershuto@gmail.com>
2023-01-11 14:33:14 +08:00
ZeroLing 914a5e7e55 Merge branch 'release/3.0' into release/3.1.0 2023-01-09 22:00:36 +08:00
染陌同学 7c273dc418
feat: suport tempelate parse for statisc dataloader (#5749)
* feat: suport tempelate parse for statisc dataloader

* fix: modify replace url

* chore: update version

* feat: support lazy parse & add type (#5750)

* feat: lazy parse

* fix: loadDataByCustomFetcher type

* chore: DataLoader is unused

* feat: modify matchAll

* feat: Not parse template in SSG/SSR

* chore: use [] replace item[0]

* test: add test for template

* chore: add CHANGELOG

* chore: modify changelog

Co-authored-by: 长喆 <2316371523@qq.com>
2023-01-04 23:45:34 -08:00
染陌同学 a31ac73071
fix: fix distType (#5728)
* fix: fix distType

* chore: add isArray

* feat: js entry should render document by matches
2023-01-04 01:30:52 -08:00
染陌同学 2cb9a05d07
feat: modify textContent to support styleElement in weex (#5763) 2023-01-04 01:30:37 -08:00
luhc228 2d26e96790
refactor: log (#5733)
* chore: log error stack

* feat: namespace logger

* fix: log level

* chore: changelog

* fix: log with no extra info

Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
2022-12-27 15:48:28 +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
Albert 0641a5d07d
fix: fix: the error of switching route in react 16 #5739 (#5741) 2022-12-22 16:47:11 +08:00
染陌同学 a44e145088
Feat/support js entry bundle (#5615)
* feat: modify generateHtml to generateEntry

* feat: support entry

* chore: update lock

* feat: support extra script

* feat: add config for entry

* feat: support entryType

* feat: add documentToJs

* feat: remove ejs to template

* chore: modify entry to output

* feat: add dom render

* chore: update lock

* chore: should publish templates

* feat: modify type and merge config

* feat: remove setConfig for output

* chore: modify jsOutput

* feat: add paths of outputs

* fix: should get data when after.start.compile

* feat: support dev

* feat: modify dist type

* chore: modify htmlOutput

* fix: modify dirname

* chore: modify dirname

* chore: add type for __ICE__CREATE_ELEMENT

* test: add test for domRender

* feat: add renderToHTML

* chore: modify platform

* chore: version

* fix: remove dataloaderFetcher (#5687)

* fix: remove dataloaderFetcher

* chore: add changelog

* docs: add docs of cumstom render for document (#5689)

* Fix/appear ref (#5693)

* fix: fix ref of Visibility

* chore: modify version

* feat: modify type of ref

* feat: fix appear and add test

* chore: add default value to urls

Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
2022-12-18 19:40:52 -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
染陌同学 c72c7d3b08
feat: support PHA static dataloader to manifest (#5685)
* feat: get dataloader config from pages

* feat: Set static dataloader to data_prefetch of manifest

* feat: set static dataloader to data_prefetch of frames

* chore: dealwith lint

* feat: support loaderConfig in middleware

* feat: add getLoadersConfig in index

* chore: modify title

* test: add test for static dataloader of pha

* feat: merge loaders and dataloaderCOnfig

* feat: modify name

* chore: deal with ts

* feat: modify loaders

* feat: modify getDataloaderConfig

* feat: modify loadersconfig

* chore: modify changelog and versiion

Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
2022-12-14 19:41:51 -08:00
luhc228 e041933de4
fix: optimize log (#5688)
* fix: process exits directly when has error

* fix: log duplicated log on server compiler

* fix: can not start dev server

* chore: add error log

* chore: version and changelog

* chore: version

Co-authored-by: ZeroLing <i@zeroling.com>
2022-12-14 20:17:16 +08:00
水澜 0b84d27416
revert: data merge order (#5702)
Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
2022-12-14 20:07:25 +08:00
水澜 939f81f2b5
fix: ssg data loader error (#5682)
* fix: ssr data loader error

* chore: add changelog
2022-12-14 20:06:37 +08:00
ClarkXia 5aa0eb1395
chore: version and changelog (#5679) 2022-12-08 11:34:03 +08:00
水澜 b89486c384
fix: data merge order (#5652)
* fix: data merge order

* v1.0.2
2022-12-07 19:14:54 +08:00
染陌同学 288830ed54
Feat/support custom document render (#5653)
* feat: support custom render function for Scripts and etc

* feat: support custom render for Script and etc

* chore: modify type

* chore: modify ScriptRender to ScriptElement
2022-12-02 11:28:18 +08:00
逆葵 37da805963 Merge branch 'master' into feat/miniapp-native-events 2022-11-29 17:33:11 +08:00
逆葵 06061f26fd refactor(miniapp): update miniapp page lifecycles hooks 2022-11-29 17:05:53 +08:00
ClarkXia 60cad35493
chore: version (#5634) 2022-11-29 11:46:34 +08:00
水澜 b058de7c03
fix: merge context for component(#5630) 2022-11-29 10:28:41 +08:00
ZeroLing 31eb662648
chore: update repo and changelog (#5618)
* chore: add changelog and docs update

* docs: update docs repo

* Update CHANGELOG.md
2022-11-24 19:11:13 +08:00
水澜 71bce7719c
fix: app data loader (#5569)
* fix: call data loader by data-loader.js in csr

* chore: add comment
2022-11-17 11:45:45 +08:00
luhc228 c7ff8e3fff
fix: render empty html content in prod (#5560)
* fix: render empty html content in prod

* feat: basename example

* fix: ci
2022-11-16 18:00:48 +08:00
水澜 6ce0835d9b refactor: app data loader (#689)
* refactor: getAppData to dataLoader

* refactor: merge data loader logic in one file

* fix: comments
2022-11-15 16:31:09 +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
ClarkXia f9a3829e63 fix: rename getConfig as pageConfig (#684)
* fix: rename getConfig as pageConfig

* chore: optimize code

* fix: type

* fix: optimzie code
2022-11-15 10:33:11 +08:00
水澜 cf58abb821 feat: use app context separately (#681)
* feat: use app context separately

* refactor: reuse data
2022-11-15 10:33:11 +08:00
水澜 3a672c387e fix: request in data loader (#662)
* fix: support request in data loader

* fix: type

* fix: type

* fix: ts error

* fix: type

* feat: support config exports in plugin

* fix: filter static modules

* refactor: rename
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 1b38b5eb43 refactor: app provider (#644)
* refactor: app Provider

* feat: add example

* fix: example warning

* fix: AppProvider to AppRuntimeProvider

* feat: miniapp AppRuntimeProvider

* fix: miniapp provider order

* chore: remove type
2022-11-15 10:33:11 +08:00
水澜 8beb2075c4 fix: load data without matched ids (#656) 2022-11-15 10:33:08 +08:00
ClarkXia 7b1cb86299 refactor: type dependencies (#638)
* refactor: types dependencies

* chore: types

* fix: tsconfig

* chore: optimize code

* fix: conflict
2022-11-15 10:33:00 +08:00
luhc228 9208dae707 refactor: import app store (#596)
* fix: throw error when no app store

* fix: ts type

* refactor: import app store

* refactor: change extraContext to runtimeOptions

* feat: call render in plugin

* refactor: optimize code

* chore: remove log
2022-11-15 10:32:49 +08:00
ClarkXia c926a0455e fix: regex rule for different package manager (#635)
* fix: regex rule for different package manager

* chore: remove log
2022-11-15 10:32:49 +08:00
水澜 f479384c6a fix: should disable hydrate when document only (#625)
* fix: should disable hydrate when document only

* fix: disable hydrate when document only
2022-11-15 10:32:49 +08:00
ClarkXia 3c5866e533 feat: support static runtime (#609)
* feat: support static runtime

* fix: optimize code

* fix: optimize code

* fix: update app data

* fix: optimize code and add test case
2022-11-15 10:32:49 +08:00
染陌同学 0b7f438c9f chore: modify name of loaders (#621) 2022-11-15 10:32:49 +08:00
染陌同学 232aace2d1 Feat/static prefetch (#611)
* feat: add matchedIds

* feat: add matchedIds

* feat: transfrom object of getData

* feat: add transformLoaders

* feat: add fetcher to ejs

* feat: add dataLoaderExport

* feat: modify export to import

* chore: modify comment

* feat: add default fetcher

* feat: modify transformLoaders
2022-11-15 10:32:49 +08:00
ClarkXia 5b61d8acbd feat: support route config type (#595)
* feat: support route config type

* fix: type

* fix: optimize code
2022-11-15 10:32:49 +08:00
luhc228 2e57000afc feat: keep-alive (#556)
* feat: init keep-alive plugin

* chore: update lock

* feat: add api

* chore: remove plugin

* chore: not modify code

* fix: lock

* feat: support keep-alive

* chore: lock

* chore: update component name

* chore: add ref

* chore: import name

* docs: keep-alive

* chore: line break

* chore: remove unstable prefix
2022-11-15 10:32:49 +08:00
ClarkXia 3be3f6ab5c refactor: miniapp runtime (#597) 2022-11-15 10:32:48 +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
染陌同学 f8247d6472 feat: auto create root for pure js bundle (#592)
* feat: auto create root for pure js bundle

* chore: remove console and add warning

* chore: modify warning

* chore: add mock function for test
2022-11-15 10:32:48 +08:00
ClarkXia 4e954de8f3 fix: optimize html output (#569)
* fix: optimize html output

* fix: test case

* fix: optimize code
2022-11-15 10:32:43 +08:00
ClarkXia c41078d705 fix: remove useless config in document (#535)
* fix: remove useless config in document

* chore: optimize code

* fix: optimize code
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
NK 7af2915af6 fix(miniapp): lint warning (#562) 2022-11-15 10:32:43 +08:00
NK 3e031c477b feat: miniapp (#333)
* feat(miniapp): use platform in cli to generate miniapp code

* fix: lint error

* feat(miniapp): add miniapp project

* chore: revert example code

* chore: optimize code

* feat(miniapp): migrate some packages to ice

* feat(miniapp): update swcOptions for miniapp

* chore(example): add more pages

* feat(miniapp): add miniapp runClientApp

* feat(miniapp): update compile config for miniapp

* feat(miniapp): support get app and routes config in compile

* fix(miniapp): lint warning

* feat(miniapp): support routeData/routeConfig and reduce size

* fix: lint warning

* fix: lint warning

* feat(miniapp): support global css and page css

* feat(miniapp): support css modules

* feat(miniapp): support copying assets in public dir

* feat(miniapp): support Link and getSearchParams

* feat(miniapp): use index.ts.ejs as template

* feat(miniapp): support passing params in Link

* feat(miniapp): support history in miniapp

* fix(miniapp): build without compiling server bundle

* fix(miniapp): use getRoutesConfig

* feat(miniapp): support build options like outputDir

* chore(miniapp): update miniapp examples

* feat(miniapp): support html tags

* feat(miniapp): remove taro related code

* fix(miniapp): some cases

* fix(miniapp): use require.resolve to get page loader

* chore(miniapp): update lock

* fix(miniapp): page loader check this name

* chore(miniapp): add devDependencies

* chore: update index ejs template

* refactor(miniapp): update multiple platforms logic in ice

* chore: lock regenerator-runtime version

* chore(miniapp): add ali miniapp build command

* fix(ice): set default value of platform to web

* fix(runtime): remove duplicated denpdencies

* chore: set default value of platform to web

* feat(miniapp): registerSerialization when plugin activated

* test(miniapp): suit for vitest

* chore(miniapp): add webpack-sources to bundles

* chore: clean code

* chore(miniapp): remove jest config file

* fix: lint error

* fix: add default value of outputDir

* refactor(miniapp): remove openBrowser from logMessage

* chore(miniapp): remove unnecessary ts-ignore

* fix: type error

* chore(miniapp): rename Adapter to adapter

* chore(miniapp): update interface name

* refactor: use plugins to support miniapp

* chore(miniapp): update example name

* fix: update dependencies

* feat(miniapp): add platform check in cli

* chore: update lock

* fix: remove useless platform option

* fix: lint warning

* fix: lint warning

* test: use src code in tests

* chore(miniapp): remove ||= operators

* fix(miniapp): exclude miniapp-runtime esm code

* fix(ice-cli): update platform for build command
2022-11-15 10:32:43 +08:00
水澜 41302c1cb8 fix: disable hydrate when downgrade (#539)
* fix: disable hydrate when downgrade

* refactor: downgrade

* fix: remvoe dead code
2022-11-15 10:32:43 +08:00
ZeroLing 86b234162d feat: plugin jsx plus (#529)
* feat: create plugin jsx plus

* feat: add jsx plus plugin

* chore: dismiss all lint problems

* feat: add include and exclude

* docs: update docs of jsx plus

* fix: in case of auto lint fix

* fix: lint problem

* fix: compatible with node 14

* chore: update version

* chore: update pnpm lock

* fix: dev dep
2022-11-15 10:32:39 +08:00
ClarkXia 5439b89ef5 feat: add types for document component (#515) 2022-11-15 10:31:14 +08:00
luhc228 55311b43bd chore: remove consola from runtime (#498) 2022-11-15 10:30:56 +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
ZeroLing ec42015d34 Plugin/request (#439)
* feat: introduce useRequest

* chore: add some description

* fix: export statment for generator

* fix: make @ice/types dev dep

* fix: remove I prefix for interface

* fix: lint

* fix: update pnpm

* feat: add use case for app config

* fix: using export request config

* fix: review for code

* fix: dev dependency
2022-11-15 10:30:37 +08:00
逆葵 15e930045b chore: move @ice/types to devDependencies 2022-11-15 10:30:35 +08:00
逆葵 5283fcefd1 chore(types): update @ice/types version 2022-11-15 10:30:35 +08:00
逆葵 ce8f2bccde refactor(types): move runtime types to @ice/types 2022-11-15 10:30:32 +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
ZeroLing d30c5e0342 Feat/appconfig (#485)
* feat: appConfig or defineAppConfig

* test: add test for defineAppConfig
2022-11-15 10:27:46 +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
水澜 e51f296269 fix: assets order (#470)
* fix: assets order

* fix: delete anotation

* fix: page assets should load before entry assets
2022-11-15 10:27:18 +08:00
luhc228 d5d6a7ad0f feat: add Data component (#404)
* feat: add Data component

* feat: compat ssr fallback to csr

* feat: support disableFallback when renderServer

* chore: remove Data component
2022-11-15 10:27:18 +08:00
ClarkXia c66f3c2e0a feat: support import history from ice (#458)
* feat: support import history from ice

* fix: test case
2022-11-15 10:27:18 +08:00
luhc228 02eba057c3 refactor: optimize ssr error stack (#422)
* chore: add consola to runtime

* chore: format build failure

* fix: webpack error stack

* chore: remove formatBuildFailure

* chore: remove consola

* feat: optimize server compile log

* chore: remove try catch
2022-11-15 10:27:16 +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 26f8bf7b67 fix: fail to render document when csr (#428)
* fix: fail to render document when csr

* chore: merge release-next

* chore: line break
2022-11-15 10:22:42 +08:00