Commit Graph

381 Commits

Author SHA1 Message Date
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
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
luhc228 a205555e61 chore: remove appConfig extends index type (#398) 2022-11-15 10:15:35 +08:00
ZeroLing 459882146a feat: runtime document (#377)
* docs: merge with release next

* feat: add props passing for Document elements
2022-11-15 10:15:15 +08:00
luhc228 cc091c8131 fix: render client app basename (#417) 2022-11-15 10:15:15 +08:00
luhc228 511bba514f fix: incorrect server render basename (#416) 2022-11-15 10:15:15 +08:00
ClarkXia 7185da210f fix: reorder js chunk (#412) 2022-11-15 10:15:15 +08:00
luhc228 2aa2f66b2b fix: ssr stream error recursion (#392)
* chore: remove abort()

* chore: support disableFallback
2022-11-15 10:15:12 +08:00
水澜 00f75371ed feat: getAppData (#375)
* feat: getAppData

* fix: remove dead code

* fix: should remove default export for app entry too

* docs: app data
2022-11-15 10:15:12 +08:00
luhc228 d19f65b803 feat: support memory router (#351)
* feat: support memory router

* feat: support enable read page path from appContext

* feat: support pass server build options (#367)

* feat: support pass server build options

* feat: add more config

* fix: merge buildConfig

* fix: merge buildOptions (#370)

* feat: support memoryRouter config

* chore: createRouterHistory

* feat: support builOptions function
2022-11-15 10:14:38 +08:00
luhc228 d375a59d3e chore: set app.strict default value to false (#319) 2022-11-15 10:13:06 +08:00
水澜 8f8042d0cf fix: basename in faas (#328)
* fix: basename in faas

* fix: if basename not exist

* fix: type

* fix: lint

* fix: duplicate basename

* feat: server only basename

* fix: lint

* fix: type

* fix: basename order

* fix: basename order
2022-11-14 19:54:19 +08:00
luhc228 4bf28c6bb5 feat: optimize server compile (#334)
* feat: support compile server bundle after the webpack compile end

* feat: support watch appConfig

* chore: update .ice to RUNTIME_TMP_DIR

* chore: optimize code

* chore: remove build condition

* chore: remove SERVER_OUTPUT

* chore: remove compileMiddleware

* chore: comment

* fix: outputDir

* fix: comment

* chore: add preBundle option

* feat: pass serverCompileTask to plugin

* fix: get serverCompileTask from extendsPluginAPI
2022-11-14 19:53:48 +08:00
水澜 0152f33742 feat: get server data (#288)
* fix: lint

* feat: getStatiData getServerData

* refactor: distinguish static env

* test: get static data

* fix: ssr runtime env

* fix: ssr runtime env

* fix: fliter ssr runtime env

* fix: routes data may be null

* fix: return empty object if getStaticData not exists

* fix: throw error when generate html

* fix: env order

* refactor: env name

* refactor: ssg option

* refactor: get hydrate info by userConfig

* fix: lint

* fix: lint

* fix: lint

* refactor: static generation to render mode

* refactor: reset ssr env in runtime

* refactor: isCSR to csr

* fix: type
2022-11-14 19:48:13 +08:00
ClarkXia e08e5df4db feat: optimize basename for ssg (#313)
* feat: optimize basename for ssg

* fix: route path

* fix: lint
2022-11-14 19:47:16 +08:00
luhc228 1667fbafe1 feat: support set basename in plugin (#300)
* feat: support set basename in plugin

* feat: write basename to ejs template
2022-11-14 19:47:11 +08:00
luhc228 c5eef24f52 fix: key unique warning (#296)
* fix: key unique warning

* chore: change file extname from tsx to ts
2022-11-14 19:44:04 +08:00
luhc228 50be6fa47b Feat: defineAppConfig (#265)
* feat: defineAppConfig

* feat: watch

* feat: add defineAuthConfig

* chore: remove NodeNext

* chore: ts-expect-error

* feat: add ./*

* chore: add ts-expect-error

* fix: types error

* chore: declare runtime module

* chore: types

* fix: types

* refactor: types path

* fix: export path
2022-11-14 19:41:27 +08:00
luhc228 5b651061ae feat: package watch (#267)
* feat: package watch

* feat: watch

* chore: remove package watch

* feat: watch and build

* fix: build

* chore: remove prebundle from build

* chore: rename
2022-11-14 19:23:02 +08:00
ZeroLing 43437856b7 fix: add jsx dev runtime (#263) 2022-11-14 19:22:08 +08:00
ZeroLing bf812fc6ea chore: version check 2022-11-14 19:21:33 +08:00
luhc228 aaa362f55a fix: doctype not existed when renderDocument (#256) 2022-11-14 19:21:15 +08:00
ZeroLing b0ba0b8548 chore: monorepo 2022-11-14 19:20:46 +08:00
ZeroLing b727c4ded6 chore: move to @ice/runtime/jsx-runtime 2022-11-14 19:20:46 +08:00
ClarkXia e79205ed0a fix: optimize code 2022-11-14 19:20:45 +08:00
luhc228 66ba831e0f feat: support FaaS (#174)
* feat: faas middleware

* refactor: ssr middleware

* feat: 404

* chore: middlewares order

* feat: 404

* refactor: optimize

* chore: middleware name

* chore: dependencies

* fix: 404 error

* feat: add midway support

* feat: update deps version

* chore: remove faas plugin and example

* chore: lock

* fix: cannot analyse default 404 page

* chore: remove comment

* fix: start error

* chore: remove ssr middleware

* chore: 404 componentName

* chore: remove Dashboard page

* fix: default route id

Co-authored-by: Lxxyx <Lxxyxzj@gmail.com>
2022-11-14 19:20:26 +08:00
luhc228 48e80d9796 feat: support bundle cjs deps (#250)
* feat: support bundle cjs deps

* refactor: remove esbuild plugin

* chore: delete cache

* chore: log

* chore: defineConfig

* fix: comment

* chore: type

* fix: ICE_CORE_SSG

* chore: remove unless set.add
2022-11-14 19:19:50 +08:00
ClarkXia 5dc86f6d44 fix: run server app 2022-11-14 19:19:01 +08:00
ClarkXia ecf09cf763 feat: appExport 2022-11-14 19:18:41 +08:00
ClarkXia 0c88d42025 chore: remove useAppData 2022-11-14 19:17:54 +08:00
ClarkXia 4f63ff7dd9 chore: remove getAppData 2022-11-14 19:17:54 +08:00
ZeroLing 68fdcf8bc0 feat: impl onAppear and onDisappear 2022-11-14 19:17:53 +08:00
luhc228 9276bd54ca feat: add useLocation api (#212)
* feat: add useLocation api

* feat: add useLocationSingle
2022-11-14 19:17:27 +08:00
luhc228 7457c5aa55 fix: css asserts order (#224) 2022-11-14 19:17:27 +08:00
ClarkXia b10b336514 Refactor service (#159)
* feat: refactor service

* fix: functional plugin

* fix: getCompilerPlugins

* feat: add log

* fix: refactor webpack compiler

* chore: update lock

* fix: remove useless code

* fix: config type

* chore: rename folder

* chore: optimize code

* fix: mock

* fix: ssr render

* fix: types

* chore: unused vars
2022-11-14 19:17:27 +08:00
luhc228 51d0ac263a feat: support set router basename (#195)
* feat: basename

* chore: remove routeMatch in server render middleware

* fix: use webpack-dev-server instead of express

* chore: remove resolutions

* chore: devDependencies order

* refactor: routeModules

* chore: lock

* fix: types

* chore: lock

* fix: comment

* fix: comment

* chore: remove webpack
2022-11-14 19:17:25 +08:00
ClarkXia d1d5912394 fix: hmr failed when reload (#202) 2022-11-14 19:17:25 +08:00
luhc228 7e92e55e15 fix: csr load component module (#188)
* fix: csr load component module

* chore: comment
2022-11-14 19:17:25 +08:00
luhc228 19b00c1276 feat: mock (#161)
* feat: support get mock data

* feat: middleware

* feat: support watch mock dir file change

* chore: lock

* fix: mock

* chore: lint

* feat: put mock middleware to first

* feat: support mock exclude

* fix: app.addProvider not be added (#190)

* feat: app.addProvider not be executed

* fix: still excute when error

* chore: skip test
2022-11-14 19:17:25 +08:00
luhc228 f510bf65cc fix: fs/promises module not found in node12 (#186)
* chore: fs/promises not works in node12

* chore: use fse instead fs

* fix: build error in pnpm v7
2022-11-14 19:17:22 +08:00
水澜 27599db870 refactor: getAppData (#183)
* feat: data loader

* refactor: put load logic to runtime

* feat: pass matched ids

* refactor: reuse initial context

* feat: generate loader template

* fix: name with slash

* fix: name with slash

* feat: throw error

* feat: preload app data

* refactor: initail context to request context

* chore: add comment

* chore: add comment

* fix: type

* fix: merge conflict

* refactor: get app data

* fix: conflict

* fix: csr app data

Co-authored-by: luhc228 <luhengchang228@126.com>
2022-11-14 19:17:10 +08:00
水澜 5af5199972 feat: preload data (#158)
* feat: data loader

* refactor: put load logic to runtime

* feat: pass matched ids

* refactor: reuse initial context

* feat: generate loader template

* fix: name with slash

* fix: name with slash

* feat: throw error

* feat: preload app data

* refactor: initail context to request context

* chore: add comment

* chore: add comment

* fix: type

* fix: merge conflict

* fix: types error

* fix: merge error

Co-authored-by: luhc228 <luhengchang228@126.com>
Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
2022-11-14 19:17:10 +08:00
水澜 704247de1e fix: csr hydrate error (#176)
* fix: csr hydrate error

* chore: demo for csr

* refactor: update route config

* fix: lint

* chore: update lock yaml

* fix: type

* refactor: pass app to document by context

* fix: lint

* chore: comment

* fix: type

* fix: do not overwrite title if not config

* chore: rename

Co-authored-by: luhc228 <luhengchang228@126.com>
2022-11-14 19:17:10 +08:00
大果 69c7ecb251 feat: support tree-shaking react-router deps when only one route (#86)
* feat: support tree-shaking react-router deps when only one route

* chore: optimize history API

* fix: typo error

* chore: make esbuild compile @ice/runtime add inject env vars

* chore: make esbuild compile @ice/runtime add inject env vars

* chore: resolve conflict

* feat: mock react-router api when disable router

* feat: env

* fix: test

* feat: support dotenv

* chore: add stringify

* chore: lock build-scripts

* feat: add removeHistoryDeadCode userConfig

* fix: duplicate register of routes

* fix: default value of define

* chore: optimize code

* fix: typo

* chore: upgrade react

* fix: code

* chore: optimize matchRoutes

Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
2022-11-14 19:17:06 +08:00
ClarkXia 1d89ae541d fix: server exports (#173)
* fix: server exports

* fix: types
2022-11-14 19:16:54 +08:00
ClarkXia 3590d723c7 chore: remove useless fallback which cause infinite reload (#166) 2022-11-14 19:16:51 +08:00
水澜 97f7388ccf feat: suspense ssr (#143)
* feat: suspense ssr

* feat: stream render

* feat: downgrade to document

* feat: support render document only

* fix: typo

* refactor: downgrade for page

* fix: typo

* refactor: piper

* refactor: navigator

* chore: comment

* fix: typo

* feat: add log

* refactor: piper to pipe

* refactor: rename

* feat: log for error

* refactor: pipe in else

* fix: lint

* refactor: rename to pipe

* feat: add downgrade info
2022-11-14 19:16:51 +08:00
水澜 e0297618b1 refactor: route wrapper (#135)
* refactor: wrapper

* feat: support wrapper layout

* chore: demo for auth

* fix: typo

* fix: typo

* fix: typo

* fix: typo

* fix: typo

* feat: generate layout info when build

* refactor: wrapper for layout

* test: update snapshot for layout

* fix: typo
2022-11-14 19:16:51 +08:00
shuilan.cj b12122a31a fix: typo 2022-11-14 19:16:50 +08:00
shuilan.cj c65b0f2321 refactor: add component with children 2022-11-14 19:16:46 +08:00
shuilan.cj 668cbc55c4 refactor: hydrate api 2022-11-14 19:16:44 +08:00
shuilan.cj 740595cce0 feat: upgrade to react 18 2022-11-14 19:16:38 +08:00
luhc228 a37b09a321 fix: fail to load latest module in ssr (#123)
* fix: fail to load latest module in server env

* chore: update desc
2022-11-14 19:16:17 +08:00
水澜 99e586bf7c Feat nested routing (#112)
* feat: nested routing

* fix: update page config after navigate

* fix: initial value

* refactor: fn name

* feat: avoid load data for old route

* refactor: decoupling the dependency to page

* refactor: types for getConfig

* refactor: use prmomise

* chore: rename

* test: filter matched route

* chore: optimize types

* feat: support useAppData

* chore: just play

* chore: remove log

* chore: resolve conflict

* refactor: pages to routes

* fix: page to route

* refactor: merge value

Co-authored-by: liuxiong.lx <liuxiong.lx@alibaba-inc.com>
2022-11-14 19:16:12 +08:00
ClarkXia b50d478103 feat: optimize output folder (#115)
* feat: optimize folder

* fix: assets transform

* fix: optimze code

* fix: optimize code
2022-11-14 19:15:57 +08:00
luhc228 54163342ef Feat: define routes and ignore route files (#69)
* feat: support define routes

* fix: test

* fix: test

* chore: undefined type

* fix: conflict

* chore: remove pages str from route id

* fix: watch route change

* fix: warn

* fix: test

* fix: test

* chore: example

* chore: add route-gen example

* feat: add integration test

* chore: test

* chore: update config file

* chore: remove pnpm cache

* chore: test

* chore: remove test:ci from ci workflow

* chore: update build-scripts version

* chore: build fixture

* chore: remove devServer test

* chore: buildFixture

* feat: add vitest

* chore: add ts-ignore

* chore: node ci version

* chore: comment bundle analyzer

* chore: add test timeout

* fix: lint

* chore: remove threads

* chore: set maxThreads and minThreads

* chore: add maxConcurrency

* chore: remove coverage

* chore: threads

* chore: set threads to false

* fix: conflict

* fix: comment
2022-11-14 19:15:57 +08:00
luhc228 e8407ed19a Feat: support css modules in ssr (#43)
* feat: support css module in ssr

* chore: lock

* chore: type

* fix: transform esbuild-style-plugin in jest env

* fix: test fail

* chore: transformIgnorePatterns

* chore: ci test step

* chore: -max-old-space-size

* chore: transformIgnorePatterns

* chore: transformIgnorePatterns

* chore: transformIgnorePatterns

* feat: esbuild-css-plugin

* refactor: esbuild plugins

* chore: esbuild plugin dir

* fix: build error

* fix: lint

* fix: conflict

* chore: add desc

* chore: add comment

* chore: set extract to false

* chore: add more desc
2022-11-14 19:15:46 +08:00
水澜 525142f9d4 refactor: hydrate document (#74)
* feat: update page config after link

* Rename Document.tsx to document.tsx

* chore: add comment

* test: routing

* fix: test utils of puppeteer page

* test: update pageconfig after route

* chore: add origin source

* fix: meta tag

* fix: add s

* feat: reuse the links already loaded

* refactor: hydrate document

* refactor: pass data by app context

* refactor: get assets in document

* refactor: pass app as children

* refactor: use app context

* revert: document

* refactor: pass document by app context

* Rename document.tsx to Document.tsx

* fix: hydrate error

* chore: add comment

* feat: toggle for ssr

* refactor: entry options

* refactor: merge simple functions

* feat: downgrade to csr

* refactor: ssr entry

* fix: file name

* fix: remove deadcode

* Rename generateHtml.ts to generateHTML.ts

* fix: remove deadcode

* fix: remove deadcode

* refactor: remove block scripts

* feat: pass ssr flag to csr

* fix: remove ssg flag

* fix: spelling

* refactor: pass ssr flag to hydrate

* chore: add todo for runtime

* fix: typo

* chore: add todo for load links

* chore: send html for send html

* refactor: remove config for custom rootId

* feat: load page assets

* feat: ssr config

* refactor: disable csr hydrate warning

* chore: add issue link

Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
2022-11-14 19:15:29 +08:00
ClarkXia 748adfb2c4 refactor: create @ice/app for framework (#67)
* fix: package name

* refactor: main package for ice

* fix: test case

* test: test case

* test: run context without built-in plugin

* test: add console level

* test: test case

* fix: remove built-in plugin

* test: use json file

* Revert "test: use json file"

This reverts commit be309d7df5a00fcc14fdc54fe2a63c9bce54221c.

* fix: update build-scripts

* fix: optimize code

* fix: exports field

* chore: use consola instead of console

* fix: optimize code
2022-11-14 19:14:32 +08:00
大果 4552afaec8 chore: refactor router (#58)
* chore: refactor router

* chore: add example

* fix: load all modules in first request

* fix: route module load

* chore: remove unused param

* fix: rerender twice

* fix: loadRouteModules params

Co-authored-by: luhc228 <luhengchang228@gmail.com>
2022-11-14 19:14:14 +08:00
shuilan.cj 6b5d56bc15 fix: type 2022-11-14 19:13:50 +08:00
shuilan.cj 785db8e0d1 refactor: less optional chaining 2022-11-14 19:13:50 +08:00
shuilan.cj 0cd671d76f refactor: less optional chaining 2022-11-14 19:13:50 +08:00
shuilan.cj 99ae148bc4 fix: optional chaining 2022-11-14 19:13:50 +08:00
shuilan.cj dd72462092 fix: optional chaining 2022-11-14 19:13:50 +08:00
shuilan.cj 72d94642dd chore: rename context 2022-11-14 19:13:50 +08:00
shuilan.cj 5995a73ebf fix: type 2022-11-14 19:13:46 +08:00
shuilan.cj 7dc8e9b46e refactor: pass page data 2022-11-14 19:13:27 +08:00
ClarkXia 6f9e64bea5 fix: improve framework config (#36)
* feat: config

* fix: webpack config

* feat: user config

* fix: css minimizer option

* fix: css minimizer option

* fix: alias with root

* fix: default define

* chore: optimize code

* fix: optimize code

* chore: update comment

* chore: lint

* chore: remove useless code

* fix: assets mainfest

* fix: test case
2022-11-14 19:12:43 +08:00
ClarkXia 647996e63e feat: define runtime value (#30)
* feat: define runtime value

* chore: remove console

* test: fix test option

* fix: remove process fallback for client

* fix: optimize code

* feat: optimize code

* fix: optimize code

* fix: types

* chore: optimize code

* test: add test case

* fix: remove useless code

* chore: optimize code

* chore: optimize code
2022-11-14 19:12:27 +08:00
水澜 edc436a073 feat: Document (#34)
* feat: match route

* feat: generate route manifest

* feat: document component

* refactor: remove routes json

* feat: route data

* refactor: render async scripts

* feat: manifest

* fix: pass path info

* fix: block css

* fix: hijackwebpack

* feat: get assets from manifest

* fix: ts error

* feat: mege page assets and config

* fix: file suffix

* fix: file suffix

* fix: await generate html

* refactor: return the last page config

* fix: pageconfig may be null

* fix: page config type

* chore: log test result

* chore: log test result

* chore: log test result

* chore: log test result

* chore: enable after compile

* fix: await compile

* fix: await compile

* feat: assets manifest

* fix: lint

* fix: enable build test

* fix: enable build test

* fix: type

* chore: add comment

* fix: conflict

* fix: conflict

* refactor: use first compile tag

* refactor: root -> main

* refactor: server context to request context

* fix: defer attr

* refactor: load route data

* refactor: fn name

* refactor: rename to client entry

* refactor: rename route wapper to page wapper

* fix: aplus blocks the puppeteer load page

* fix: remove plugin not needed

* chore: add todo

* fix: update lock file

* feat: rewrite matchRoutes function

* fix: await async hooks (#41)

* chore: add todo

* refactor: route manifest

* chore: update lock file

* fix: get route str

* refactor: set default output

* refactor: set default output

* refactor: get extname

* refactor: rename plugin folder

* fix: file path

* fix: support tsx

Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
Co-authored-by: luhc228 <luhengchang228@gmail.com>
2022-11-14 19:12:06 +08:00
shuilan.cj aa73e0cc50 revert: document options 2022-11-14 19:11:05 +08:00
shuilan.cj aed4a7b4e8 feat: pass server data to client 2022-11-14 19:10:47 +08:00
shuilan.cj 641321ef60 fix: get route str 2022-11-14 19:09:42 +08:00
shuilan.cj 51296eddf8 chore: add todo 2022-11-14 19:09:17 +08:00
luhc228 de7ec7dfd3 feat: rewrite matchRoutes function 2022-11-14 19:08:44 +08:00
shuilan.cj 6ad921f5fb refactor: rename route wapper to page wapper 2022-11-14 19:07:54 +08:00
shuilan.cj bcf39baac2 refactor: fn name 2022-11-14 19:07:48 +08:00
shuilan.cj 93de986b94 refactor: load route data 2022-11-14 19:07:32 +08:00
shuilan.cj 45bf5bc420 fix: defer attr 2022-11-14 19:07:14 +08:00
shuilan.cj db21ef183d refactor: server context to request context 2022-11-14 19:07:09 +08:00
shuilan.cj 498877ccdb refactor: root -> main 2022-11-14 19:06:40 +08:00
shuilan.cj 7987d15c61 feat: assets manifest 2022-11-14 19:05:44 +08:00
luhc228 e7735ec588 feat: await chunk import in CSR (#35)
* chore: remove this is undefined in esm warning

* chore: remove plugin-router

* feat: merge render

* feat: merge defaultAppConfig

* feat: support redirect without lazy

* fix: redirect error

* fix: ssr render error

* feat: add transition file

* refactor: route

* chore: update transition

* refactor: transition

* chore: ProvidePlugin

* chore: remove console

* chore: add router-dom server reference

* feat: add PageContext

* fix: comment

* chore: BrowserEntry

* chore: comment

* chore: update lock

* chore: error

* chore: loadRoutesModules

* feat: initialContext types
2022-11-14 19:05:10 +08:00
shuilan.cj 1d16997af8 fix: page config type 2022-11-14 19:03:39 +08:00
shuilan.cj fc21fd912f fix: pageconfig may be null 2022-11-14 19:01:47 +08:00
shuilan.cj 80f2912e04 refactor: return the last page config 2022-11-14 19:01:47 +08:00
shuilan.cj c39eb7bc9b fix: file suffix 2022-11-14 19:01:47 +08:00
shuilan.cj 0c7dff4751 fix: file suffix 2022-11-14 19:01:47 +08:00
shuilan.cj 6b7450eaa7 feat: mege page assets and config 2022-11-14 19:01:35 +08:00
shuilan.cj d43164123a feat: get assets from manifest 2022-11-14 19:01:14 +08:00
shuilan.cj eaeb94e782 fix: block css 2022-11-14 19:00:56 +08:00
shuilan.cj 7327af31ae refactor: render async scripts 2022-11-14 18:59:35 +08:00
shuilan.cj d4cbe9182b feat: route data 2022-11-14 18:59:05 +08:00
shuilan.cj 56a3e36bdf chore: remove log info 2022-11-14 18:55:37 +08:00
shuilan.cj 39a685761f fix: routes type name 2022-11-14 18:55:37 +08:00
shuilan.cj 1593b72fdd refactor: add app routes 2022-11-14 18:55:37 +08:00
shuilan.cj 90bc3d56c1 refactor: app router to app routes 2022-11-14 18:55:34 +08:00
shuilan.cj 441aab1f80 refactor: change to anonymous fn 2022-11-14 18:55:10 +08:00
shuilan.cj 118a142ee0 refactor: set router by runtime 2022-11-14 18:55:10 +08:00
shuilan.cj 490507b537 refactor: put universal logic to app 2022-11-14 18:55:06 +08:00