Commit Graph

522 Commits

Author SHA1 Message Date
逆葵 c7ec3a43a8 Merge branch 'release/next' into feat/miniapp-native-events 2023-04-25 15:25:10 +08:00
逆葵 4539817317 docs(miniapp): update doc and example 2023-04-25 10:57:36 +08:00
逆葵 6f7a47e0b4 chore: update dependencies version 2023-04-25 10:49:28 +08:00
水澜 f56497f694
feat: async data loader (#6137)
* chore: refactor unfinished

* feat: support create router

* refactor: render mode

* fix: code splitting false

* feat: add location for icestark

* chore: remove console

* test: examples

* fix: dataloader is undefined

* fix: test

* fix: test case

* fix: test case

* fix: types

* fix: test case

* fix: lock

* feat: async data loader

* fix: update lock

* fix: hydration

* fix: router

* fix: router

* chore: log

* fix: hmr

* fix: test

* fix: test

* feat: await

* fix: await component

* fix: lint

* refactor: type

* fix: type

* fix: app data loader

* fix: test

* fix: test

* test: async data

* test: async data

* docs: async data loader

* fix: lint

* refactor: loader config

* fix: test

* fix: compat with old useage

---------

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

* feat: fusion example with i18n

* feat: init plugin-i18n

* feat: init i18n example

* chore: lock

* feat: add language selector

* feat: i18n route

* feat: getAllLocales and getDefaultLocale API

* fix: ssr render error

* feat: support auto redirect

* fix: redirect without url param

* feat: support add response handler

* chore: lock

* feat: support blockCookie option

* fix: route test

* fix: ssg error

* fix: i18n response

* feat: add server example

* chore: add basename

* chore: add headers

* feat: i18n docs

* fix: i18n plugin

* feat: enhance disable cookie

* docs: update disabledCookie documentation

* chore: update desc

* fix: param not defined

* fix: generate routes.ts

* fix: remove todo

* test: i18n

* test: i18n

* fix: lint warning

* fix: addDefineRoutesFunc to addRoutesDefinition

* chore: i18n plugin version

* chore: changelog

* feat: use modifyRenderData instead of runtimeOptions.raw

* chore: update changelog

* chore: rename param

* fix: comment

* feat: use createLogger instead of consola directly

* feat: change customRuntimeOptions type from string to object

* refactor: route id

* chore: remove unused console.log

* chore: add comment

* fix: win32 test fail

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

* feat: support create router

* refactor: render mode

* fix: code splitting false

* feat: add location for icestark

* chore: remove console

* test: examples

* fix: dataloader is undefined

* fix: test

* fix: test case

* fix: test case

* fix: types

* fix: test case

* fix: lock

* fix: update lock

* fix: hydration

* fix: router

* fix: router

* chore: log

* fix: hmr

* fix: test

* fix: test

* chore: optimize code

* Update singleRoute.test.tsx

* fix: types
2023-04-13 12:01:16 +08:00
逆葵 b1bfef0ca9 Merge remote-tracking branch 'origin/release/next' into feat/miniapp-native-events 2023-03-28 15:05:11 +08:00
逆葵 995b02e8ee chore(miniapp): update define config 2023-03-28 14:16:04 +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 085498aa8a
feat: support plugin API of excuteServerEntry (#6097)
* feat: support plugin API of excuteServerEntry

* fix: build error

* chore: optimize code

* fix: remove cache for excute server entry
2023-03-22 17:53:24 +08:00
ClarkXia 4a73cb2ad2
fix: redirect named import (#6061)
* fix: redirect named import

* fix: test case

* fix: redirect request

* test: redirect request

* chore: add changeset

* feat: support get exports by target

* fix: type

---------

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

* fix: lint

* chore: add changelog
2023-03-14 11:43:30 +08:00
ClarkXia 021ceb91c0
fix: remove resolve field of jsnext:main (#6045)
* fix: context replacement for moment

* fix: regex rule

* fix: changelog

* fix: optimize webpack config

* fix: optimize webpack config

* fix: optimize code
2023-03-13 17:44:21 +08:00
luhc228 71bb754dc8
feat: support route index and nested url without nested layout (#6020)
* feat: support route index

* chore: changeset

* docs: update router docs

* feat: support nested urls without nesting layouts

* feat: support escape route

* docs: nested url

* chore: update changeset

* fix: test

* test: escape and nested routes

* chore: add comment
2023-03-09 10:17:25 +08:00
ClarkXia fa618ea200
fix: file name should compat with win32 (#6023) 2023-03-07 15:56:11 +08:00
ClarkXia bb7488720a
fix: compatible with dynamic routes when disable lazy import (#6014) 2023-03-06 16:02:10 +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
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 b8e974393f
feat: support routes config (#5968)
* feat: support routes config

* fix: compatible with win32

* feat: add test case

* fix: optimize code

* fix: compatible with path

* Update routes.ts

* Update routes.ts
2023-02-28 10:00:43 +08:00
ClarkXia 071a627dac
feat: support code spiliting strategy (#5957)
* feat: support code spiliting strategy

* fix: optimize code

* fix: compatible with splitChunks

* fix: compatible with splitChunks

* chore: default value chunks

* Update config.md

* Update routes.ts
2023-02-24 17:22:18 +08:00
ClarkXia 1b6c57832a
feat: on-demand compilation for server (#5824)
* feat: node runner

* feat: node transform

* fix: unexpected modification

* fix: node runner

* test: test case

* test: test case

* test: test case

* fix: add dependencies

* fix: optimize code

* feat: server runner

* feat: optimize code

* fix: test case

* fix: test case

* feat: support on demand pre bundle

* chore: lint warning

* fix: optimize code

* fix: compile options

* fix: optimize code

* fix: add file

* fix: optimize code

* fix: test case

* fix: optimize code

* fix: test

* fix: compile target

* fix: optimize code

* fix: lint

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

* fix: changeset

* chore: publish beta

* chore: update pre

* chore: custom version

* chore: remove test

* fix: version

* chore: test case

* chore: version

* fix: reset changelog

* fix: update lock

* fix: changelog

* chore: release beta version

* chore: add changeset

* chore: release beta version

* chore: update @ice/app version

* chore: update version and lock

---------

Co-authored-by: luhc228 <luhengchang228@126.com>
2023-02-16 16:11:49 +08:00
ClarkXia 537d154899
fix: optimize webpack config (#5891)
* fix: optimize webpack config

* chore: version

* fix: lock file
2023-02-13 14:58:06 +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 7c07f1654a
fix: data-loader using serverCompiler with renderer client (#5856)
* fix: data-loader using serverCompiler with renderer client

* fix: renderer
2023-02-02 20:07:49 +08:00
水澜 412311a750
fix: esbuild target (#5857)
* fix: filter browser for esbuild

* fix: esbuild target
2023-02-02 19:54:15 +08:00
水澜 d2f0b7e5c7
feat: suspense ssr (#5584)
* feat: suspense ssr demo

* chore: rename global variable

* chore: update lock

* feat: suspense demo

* chore: delete dead code

* refactor: rename to data context

* fix: error triggered in steam, should not downgrade

* feat: suspense ssr

* fix: should async script when suspense

* feat: support suspense for common components

* feat: support suspense for common components

* fix: style type lint

* fix: typings

* feat: remove server data loader for suspense component

* feat: disable dataLoader for suspense

* chore: add style

* chore: add changelog

* chore: add changelog

* chore: add comments

* refactor: check suspense data

* fix: type

* test: suspnese

* fix: compat with ssg

* feat: fallback for suspense

* feat: suspense fallback

* refactor: pass id as props

* refactor: pass fallback as element

* fix: type

* docs: suspense

* docs: suspense

* refactor: support suspense in components

* fix: changelog

* fix: lint

* fix: should not replace env to string

* chore: add changelog

* chore: remove dead code

* revert: dataloader for ssr

* fix: lint

* refactor: rename

* docs: hide suspense ssr

* refactor: remove internal error boundary

* refactor: merge if condition

* fix: type

* refactor: suspense api

---------

Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
2023-02-02 16:00:04 +08:00
ZeroLing acfc88427e
fix: dynamic import works in app.tsx (#5840)
* fix: dynamic import works in app.tsx

* fix: test case

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

* chore: pnpm lock up-to-date
2023-02-02 14:22:35 +08:00
ClarkXia 234e6cb170
feat: support lifecycle of bootstrap (#5825) 2023-02-01 16:08:51 +08:00
ZeroLing 0817129fd3
Fix/rax-compat jsx runtime (#5803)
* fix: jsx runtime for rax-compat

* fix: optional children

* fix: array key validation

* fix: eslint check

* fix: add default commandArgs target

* fix: createElement children args

* docs: add changelog and bump version
2023-01-12 12:04:06 +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
ClarkXia 7b686f4f82
fix: default value of ssr (#5805)
* fix: default value of ssr

* fix: test case

Co-authored-by: ZeroLing <i@zeroling.com>
2023-01-10 22:47:24 +08:00
ZeroLing f46d0e7204
feat: support target and renderer (#5700)
* feat: support target and renderMode

* fix: test case and renderer

* Update build.ts

* refactor: constant

* fix: eslint

* fix: remove empty line

* fix: remove useless code

* feat: add import.meta.env

* fix: type webpack

* fix: server compiler defines
2023-01-06 15:07:39 +08:00
长喆 fc408b9235
Fix(plugin-pha): getRouteIdByPage (#5753)
* feat: map route page to page id

* feat: map route page to page id

* feat: finish examples

* fix: route key

* feat: add layout to dataloader

* Update manifestHelpers.ts

* feat: name staticDataLoaders
2023-01-03 22:58:14 -08:00
水澜 f62ec86c50
fix: rerender ssg after hydrate (#5755)
* feat: update ssg data after hydrate

* v1.0.4

* test: ssg

* test: ssg

* chore: changelog

* revert: no optional

* fix: update app context

* refactor: call data loader in useEffect
2022-12-27 14:33:03 +08:00
ClarkXia 8b98d8a8cc
refactor: server bundle alias (#5736)
* fix: refactor server bundle alias

* chore: update lock

* fix: test case

* fix: test case

* chore: changelog

* fix: optimize code

* fix: compatible with win32

* fix: compatible with win32

* fix: compatible with win32

* fix: optimize code

Co-authored-by: ZeroLing <i@zeroling.com>
2022-12-27 10:58:18 +08:00
ClarkXia 05aeb94f6b
feat: plugin for icestark (#5695)
* feat: plugin icestark arch

* feat: icestark child app

* chore: update type

* fix: icestark child

* feat: icestark layout

* feat: icestark framework

* feat: test case for icestark

* chore: changelog

* fix: optimize code

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

* test: add test case

* fix: compatible with win32

* test: test case
2022-12-08 10:21:01 +08:00
ClarkXia 6e28b672a1
fix: load env before resolve user config (#5665)
* fix: load env before resolve user config

* chore: changelog

* chore: add env file

* Delete ice.config.mts.mjs

Co-authored-by: ZeroLing <i@zeroling.com>
2022-12-08 10:11:43 +08:00
ClarkXia 46ddc52428
fix: format core-js path (#5648)
* fix: format core-js path

* chore: test

* chore: update version

* fix: remove path import
2022-12-06 14:31:35 +08:00
逆葵 e3672cbeaa fix(miniapp): onReady not triggered 2022-11-29 19:29:37 +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 6bcc955876
fix: file resolve when use css module in server compiling (#5632)
* fix: file resolve of css module in server compiling

* test: add test case
2022-11-29 10:45:19 +08:00
逆葵 b7afac2d70 feat(miniapp): support app and page native events 2022-11-24 18:06:50 +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
luhc228 ee8963886b feat: modify store to storeConfig (#688) 2022-11-15 19:04:24 +08:00
luhc228 2000774dfa chore: add AppData type (#692) 2022-11-15 19:04:00 +08:00
NK 8a60304b0b Fix/miniapp problems (#671)
* fix(miniapp): page load after getAppData

* docs(miniapp): update miniapp-runtime readme

* feat(miniapp): support turn off rpx2vw using enableRpx2Vw

* chore(miniapp): update example

* fix(miniapp): outputDir is wrong in command line

* fix(miniapp): no log in build command

* fix(miniapp): history type

* chore(miniapp): update example

* feat(miniapp): support enableCache to disable cache in miniapp task

* fix(miniapp): throw error if no getConfig function in page component

* feat(miniapp): add params to specify getData and getConfig

* fix(miniapp): getData/getAppData existence situation

* feat(miniapp): normalize route in history

* fix: lint warning

* feat(miniapp): align Link to props and history.push props

* docs(miniapp): add more articles

* feat(miniapp): support nativeConfig in plugin-miniapp

* feat(miniapp): rename getConfig to pageConfig

* feat(miniapp): rename getData to dataLoader

* fix: lint warning

* docs: fix broken links

* docs(miniapp): update miniapp location and relative links

* Update start.md

Co-authored-by: ZeroLing <i@zeroling.com>
2022-11-15 16:31:24 +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
染陌同学 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
ZeroLing d2c7e0696d chore: optimize (#676)
* chore: optimize with rax-compat docs

* refactor: add mock express types dependency

* refactor: change usage for definePageConfig

* chore: change docs

* docs: ICE to ice.js

* fix: templorary remove the type

* chore: handle with lint problems

* fix: lock file
2022-11-15 10:33:11 +08:00
ZeroLing 2d0a38ba9e Docs/add request (#670)
* chore: close announcement

* docs: add doc for request

* docs: rename title for request

* docs: add.tsx

* docs: request doc

* refactor: change request to requestConfig

* chore: change usage and documentation

* docs: optimize doc

* docs: update
2022-11-15 10:33:11 +08:00
水澜 413c6edfb5 docs: nested routes (#679)
* docs: nested routes

* docs: add example

* chore: update lock

* docs: custom route path

* fix: use max width

* fix: add file path

* revert: to width

* fix: duplicate text

* fix: description

* fix: rename

* fix: file path

Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
2022-11-15 10:33:11 +08:00
水澜 80e6c059a4 docs: data loader (#667)
* refactor: data loader docs

* refactor: request.md

* refactor: img

* fix: incoherent sentence

* refactor: request to data loader

* refactor: app data loader docs

* chore: demo for data loader

* docs: multi data loader

* docs: data loader

* fix: remove dead code

* fix: video

* fix: video

* fix: height

* chore: update lock

* fix: use gif replace video

* fix: img width

* fix: link

* feat: add demo

* refactor: demo path

* fix: description

* docs: add return value type

* refactor: flow chart

* fix: link

* fix: flow chart

Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
2022-11-15 10:33:11 +08:00
ZeroLing c1b773e74a Docs/jsx plus (#672)
* chore: rename with-plugin-request to with-request

* docs: add jsx plus documentation
2022-11-15 10:33:11 +08:00
ClarkXia f0e3d570e2 feat: support query loader of raw and url (#674) 2022-11-15 10:33:11 +08:00
ClarkXia 6c34133040 fix: add process support for undefined env variables (#668) 2022-11-15 10:33:11 +08:00
luhc228 af24b565a1 feat: support postcss user config (#626)
* feat: support postcss in userConfig

* feat: support postcss.config.js

* docs: optimize config

* docs: postcss

* feat: add tailwindcss example

* chore: export postcss

* docs: update postcss

* docs: update browsers desc
2022-11-15 10:33:11 +08:00
luhc228 e88c291ad1 fix: useAuth error (#661)
* chore: example

* chore: with-auth example

* docs: update auth

* test: add with-auth test

* chore: format

* fix: lock
2022-11-15 10:33:11 +08:00
NK 5ec2523e01 feat(miniapp): add miniapp html styles package (#555) 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
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
luhc228 d9ff53302b fix: plugin-store will transform image (#639)
* fix: plugin-store will transform image

* feat: use regexp to filter module id
2022-11-15 10:33:10 +08:00
luhc228 1c8815fdad feat: web-worker example (#627)
* docs: refactor assets

* feat: web-worker example
2022-11-15 10:33:08 +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
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
luhc228 3f54369bff feat: store initialStates (#435)
* feat: store initialStates

* chore: update README

* chore: add file comment

* chore: rename type

* fix: peer dependencies

* fix: defineStoreConfig not found

* feat: support get the appData

* fix: test case

* fix: lock
2022-11-15 10:32:48 +08:00
luhc228 bcbf6b5804 feat: support runtime relative path (#537)
* feat: support runtime relative path

* chore: line break

* fix: not compatible with relative path

* feat: support absolute path

* docs: update plugin-dev

* docs: optimize config

* refactor: runtime staticRuntime and name

* fix: type

* chore: remove file path exists check
2022-11-15 10:32:43 +08:00
ClarkXia 69bc9dca08 Refactor: plugin for develop miniapp (#582)
* refactor: add plugin for miniapp development

* fix: format plugin

* fix: update build-scripts

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

* test: downgrade to csr

* chore: rename

* refactor: load route modules after only in ssr

* fix: pha test

* fix: compat with no routes config

* fix: ensure routes config before build

* fix: test case

* fix: test timeout

* fix: cache in test case

* refactor: check routes config before server compiler

* refactor: allways generate routes config

* chore: remove dead code

* fix: reset status when init config
2022-11-15 10:32:43 +08:00
luhc228 25583ffb55 feat: enhance framework types (#545)
* feat: enhance inner types

* chore: revert type
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
水澜 99d7f37fc5 refactor: generate data-loader only by getData (#514)
* refactor: generate data-loader only by getData

* feat: support config dataloader

* test: disable data-loader

* chore: rename

* docs: data loader

* chore: update lock
2022-11-15 10:32:43 +08:00
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 0e7735c358 feat: support initialize auth by app data (#519) 2022-11-15 10:32:39 +08:00
luhc228 8e13b5d68b feat: test (#512)
* feat: init jest test

* feat: support vitest

* chore: jest version

* feat: jest component test

* feat: vitest demo

* chore: add @vitest/coverage-c8 dep

* fix: lint

* docs: test

* chore: add comment

* fix: not depend on the vitest as dependencies

* chore: vitest version

* chore: version

* chore: version

* chore: lock

* fix: lock

* chore: vitest version

* fix: lock

* docs: typo

* docs: file extname
2022-11-15 10:32:34 +08:00
染陌同学 99fc777c68 Feat/support appear (#517)
* feat: support appear component

* chore: modify version

* fix: should disappear

* chore: export VisibilityChangeEvent

* feat: rax-compat use @ice/appear

* feat: need not give childref

* chore: update lock

* chore: update README and package

* chore: update README

* test: add test for appear

* chore: update lock
2022-11-15 10:31:38 +08:00
水澜 990f7aa552 feat: support inline style for ssr (#518)
* feat: inline style for less

* feat: classname to style

* feat: esbuild inline style

* feat: transform styles

* fix: compat for less module

* fix: less rule

* feat: ignore

* docs: ignore

* refactor: to ts

* test: inline-style

* chore: update lock

* fix: deps

* refactor: enable esbuild inline style loader only in ssr

* fix: validate for ignore plugins

* refactor: to pure functions

* feat: sync syntaxFeatures

* fix: lint

* Update rax-inline-style.test.ts
2022-11-15 10:31:35 +08:00
luhc228 e7424d4cb9 chore: change disableResetPageState to resetPageState (#505)
* chore: change disableResetPageState to resetPageState

* chore: add resetPageState
2022-11-15 10:31:14 +08:00
luhc228 bed716fb74 feat: plugin-css-assets-local (#520)
* feat: init plugin

* feat: add plugin to example

* fix: lock

* docs: README

* docs: css-assets-local

* fix: typo
2022-11-15 10:31:09 +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 c0c342d5d5 feat: enhance transform plugins (#502) 2022-11-15 10:30:37 +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
luhc228 41aee63512 feat: add splitChunks to userConfig (#454)
* feat: add splitChunks to userConfig

* docs: splitChunks

* test: splitChunks test case

* fix: splitChunk test case
2022-11-15 10:27:46 +08:00
luhc228 47738dca66 fix: rax project ssr failed (#467)
* fix: prebundle alias

* fix: rax multiple version

* fix: test case

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

* fix: lint

* chore: optimize code

* fix: test case

* fix: build-scripts version

* chore: update version

* chore: update lock file

* feat: add test case of win

* fix: node matrix

* fix: format path

* fix: win32 compatible

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

* feat: export useNavigate

* chore: remove useless code
2022-11-15 10:27:18 +08:00
ClarkXia 0345af7202 chore: remove useless devDependencies (#464) 2022-11-15 10:27:18 +08:00
ClarkXia 26a204945a fix: import css from node_modules (#482) 2022-11-15 10:27:18 +08:00
ClarkXia 2dbe97a76f fix: lock regenerate-runtime path (#462) 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