Commit Graph

23 Commits

Author SHA1 Message Date
Keith dcc100457f
fix: update es-module-lexer (#7050)
* fix: update es-module-lexer

* fix: ci
2025-02-20 18:07:41 +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
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
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 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
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
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 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
ClarkXia 48603cdf8f feat: support swc options for plugin-rax-compat and onappear on rax-compat (#349)
* feat: support swc options for plugin-rax-compat

* chore: example

* test: fix test case

* test: fix test case

* test: fix test case

* fix: outputdir

* fix: onappear for no ref cases

* fix: merge options

* fix: appear polyfill

* chore: remove appear polyfill dependency

* fix: add swc helpers

* fix: onappear on rax-compat

* refactor: format code and not to use react.frowardRef

Co-authored-by: ZeroLing <zhuoling.lcl@alibaba-inc.com>
2022-11-14 19:55:00 +08:00
ClarkXia adc076edc2 feat: compile dependencies (#117)
* feat: compile dependencies

* fix: optimize code

* fix: remove console

* chore: optimize code

* chore: test

* fix: test case
2022-11-14 19:15:57 +08:00
luhc228 7bbe0e9780 Fix: can not open browser in dev (#100)
* fix: can not open browser in dev

* chore: disableOpen

* fix: can not get disableOpen arg

* feat: change disable-open to open
2022-11-14 19:15:57 +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
luhc228 ab9c50913b test: use vitest instead of jest (#75)
* test: use vitest

* chore: update test script in ci.yml

* chore: remove coverage

* chore: remove max-old-space-size

* chore: not use threads

* chore: add maxThreads

* chore: set maxThreads to 2

* chore: set to node 16

* chore: set threads to false

* chore: add coverage

* chore: max-old-space-size
2022-11-14 19:15:00 +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
ClarkXia 43a143de6d feat: support defineUserConfig (#53)
* feat: support config file

* feat: config file

* feat: add config watch

* fix: createServer path

* feat: add json support

* chore: space

* fix: add browserlist and webpack bundle analyze

* fix: update package name
2022-11-14 19:13:53 +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 2559d63e86 chore: add comment 2022-11-14 19:05:51 +08:00
shuilan.cj eb1ec431f9 fix: enable build test 2022-11-14 19:05:51 +08:00
shuilan.cj 36cf373919 fix: await compile 2022-11-14 19:03:43 +08:00
shuilan.cj 78b7235107 fix: await compile 2022-11-14 19:03:43 +08:00
大果 2b11d0578e feat: router (#28)
* feat: generate route manifest

* chore: lock

* feat: support generate nested route manifest

* chore: type

* chore: rename test to tests

* chore: remove caseSensitive

* chore: support generate routes

* fix: lint

* fix: lint

* feat: add componentName

* feat: support generate route

* feat: not add Router when only has one page

* fix: merge confict

* refactor: service route generate

* chore: update route-manifest readme

* test: add more route test cases

* chore: remove comment

* test: add invalid routes test case

* chore: update invalid char judge logic

* fix: comment

* fix: lint error

* chore: lock

Co-authored-by: luhc228 <luhengchang228@gmail.com>
2022-11-14 18:49:43 +08:00