├── .nvmrc
├── .prettierignore
├── tests
├── integration
│ ├── bff-hono
│ │ ├── CHANGELOG.md
│ │ ├── .env
│ │ ├── .env.staging
│ │ └── src
│ │ │ └── routes
│ │ │ └── layout.tsx
│ ├── routes
│ │ └── src
│ │ │ ├── one
│ │ │ └── App.css
│ │ │ ├── three
│ │ │ └── routes
│ │ │ │ ├── user
│ │ │ │ ├── utils.server.ts
│ │ │ │ ├── page.module.css
│ │ │ │ ├── profile
│ │ │ │ │ ├── utils.server.ts
│ │ │ │ │ └── page.data.ts
│ │ │ │ └── page.tsx
│ │ │ │ ├── layout.config.ts
│ │ │ │ ├── page.tsx
│ │ │ │ ├── loading.tsx
│ │ │ │ ├── __auth
│ │ │ │ ├── login
│ │ │ │ │ └── page.tsx
│ │ │ │ └── __shop
│ │ │ │ │ └── item
│ │ │ │ │ └── page.tsx
│ │ │ │ ├── client-loader
│ │ │ │ ├── page.loader.ts
│ │ │ │ ├── layout.data.client.ts
│ │ │ │ └── layout.data.ts
│ │ │ │ ├── error
│ │ │ │ └── loader
│ │ │ │ │ ├── page.data.ts
│ │ │ │ │ └── page.data.client.ts
│ │ │ │ ├── layout.loader.ts
│ │ │ │ ├── user.profile.name
│ │ │ │ ├── layout.config.ts
│ │ │ │ └── page.config.ts
│ │ │ │ └── redirect
│ │ │ │ └── page.tsx
│ │ │ ├── common
│ │ │ └── utils.ts
│ │ │ ├── four
│ │ │ └── routes
│ │ │ │ ├── $.tsx
│ │ │ │ └── layout.loader.ts
│ │ │ └── modern-app-env.d.ts
│ ├── app-document
│ │ ├── .gitignore
│ │ ├── src
│ │ │ ├── test
│ │ │ │ └── App.tsx
│ │ │ ├── sub
│ │ │ │ └── routes
│ │ │ │ │ ├── a
│ │ │ │ │ └── a.less
│ │ │ │ │ └── layout.tsx
│ │ │ └── modern-app-env.d.ts
│ │ └── static
│ │ │ └── a.icon
│ ├── builder-plugins
│ │ └── src
│ │ │ └── entry.ts
│ ├── basic-app
│ │ ├── .env.local
│ │ ├── .env
│ │ ├── .env.development
│ │ ├── .browserslistrc
│ │ ├── .env.production
│ │ ├── modern.config.ts
│ │ └── src
│ │ │ └── modern-app-env.d.ts
│ ├── bff-corss-project
│ │ └── bff-api-app
│ │ │ ├── .gitignore
│ │ │ ├── shared
│ │ │ └── index.ts
│ │ │ └── api
│ │ │ └── user
│ │ │ └── [id].ts
│ ├── copy-assets
│ │ ├── src
│ │ │ └── entry.ts
│ │ └── modern.config.ts
│ ├── server-monitors
│ │ └── README.md
│ ├── alias-set
│ │ └── src
│ │ │ ├── alias
│ │ │ └── index.ts
│ │ │ ├── common
│ │ │ └── constants.ts
│ │ │ └── App.tsx
│ ├── routes-match
│ │ └── src
│ │ │ ├── a
│ │ │ └── App.tsx
│ │ │ ├── b
│ │ │ └── App.tsx
│ │ │ └── c
│ │ │ └── App.tsx
│ ├── server-prod
│ │ ├── config
│ │ │ ├── public
│ │ │ │ └── MP_verify_abcdef.txt
│ │ │ ├── icon.png
│ │ │ └── favicon.ico
│ │ └── src
│ │ │ ├── assets
│ │ │ └── favicon1.ico
│ │ │ ├── activity
│ │ │ └── App.jsx
│ │ │ └── server-prod
│ │ │ └── App.jsx
│ ├── source-code-build
│ │ ├── components
│ │ │ └── src
│ │ │ │ └── index.tsx
│ │ ├── common
│ │ │ └── src
│ │ │ │ ├── types
│ │ │ │ └── index.ts
│ │ │ │ └── index.ts
│ │ ├── utils
│ │ │ └── src
│ │ │ │ └── common
│ │ │ │ ├── index.ts
│ │ │ │ ├── toLowerCase.ts
│ │ │ │ └── toUpperCase.ts
│ │ └── app
│ │ │ ├── .browserslistrc
│ │ │ └── src
│ │ │ └── modern-app-env.d.ts
│ ├── asset-prefix
│ │ └── src
│ │ │ └── entry.ts
│ ├── load-config
│ │ └── fixtures
│ │ │ ├── basic-local-config
│ │ │ └── src
│ │ │ │ └── entry.ts
│ │ │ ├── async-config-function
│ │ │ └── src
│ │ │ │ └── entry.ts
│ │ │ ├── config-function-params
│ │ │ └── src
│ │ │ │ └── entry.ts
│ │ │ └── local-config-function
│ │ │ └── src
│ │ │ └── entry.ts
│ ├── ssr
│ │ ├── fixtures
│ │ │ ├── streaming
│ │ │ │ └── src
│ │ │ │ │ └── routes
│ │ │ │ │ ├── about
│ │ │ │ │ └── about.css
│ │ │ │ │ └── redirect
│ │ │ │ │ └── page.tsx
│ │ │ ├── streaming-inline
│ │ │ │ └── src
│ │ │ │ │ └── routes
│ │ │ │ │ ├── about
│ │ │ │ │ └── about.css
│ │ │ │ │ └── redirect
│ │ │ │ │ └── page.tsx
│ │ │ ├── base-async-entry
│ │ │ │ └── src
│ │ │ │ │ └── routes
│ │ │ │ │ ├── index.css
│ │ │ │ │ └── page.tsx
│ │ │ ├── partial
│ │ │ │ └── src
│ │ │ │ │ └── one
│ │ │ │ │ └── routes
│ │ │ │ │ ├── page.tsx
│ │ │ │ │ ├── a
│ │ │ │ │ └── page.data.ts
│ │ │ │ │ ├── b
│ │ │ │ │ ├── d
│ │ │ │ │ │ └── page.data.ts
│ │ │ │ │ └── page.data.ts
│ │ │ │ │ └── layout.data.ts
│ │ │ ├── fallback
│ │ │ │ └── src
│ │ │ │ │ └── routes
│ │ │ │ │ └── page.tsx
│ │ │ ├── base
│ │ │ │ └── src
│ │ │ │ │ ├── routes
│ │ │ │ │ ├── layout.loader.ts
│ │ │ │ │ └── redirect
│ │ │ │ │ │ └── page.tsx
│ │ │ │ │ └── modern-app-env.d.ts
│ │ │ ├── base-json
│ │ │ │ └── src
│ │ │ │ │ └── routes
│ │ │ │ │ └── redirect
│ │ │ │ │ └── page.tsx
│ │ │ └── scriptLoading
│ │ │ │ └── modern.config.ts
│ │ └── tests
│ │ │ └── __snapshots__
│ │ │ ├── base.test.ts.snap
│ │ │ └── base-json.test.ts.snap
│ ├── async-entry
│ │ └── src
│ │ │ └── App.tsx
│ ├── deploy-csr
│ │ └── src
│ │ │ ├── modern-app-env.d.ts
│ │ │ ├── one
│ │ │ └── routes
│ │ │ │ ├── page.data.ts
│ │ │ │ └── layout.tsx
│ │ │ └── two
│ │ │ └── routes
│ │ │ ├── page.data.ts
│ │ │ └── layout.tsx
│ ├── disable-html
│ │ ├── src
│ │ │ └── App.tsx
│ │ └── modern.config.ts
│ ├── pure-esm-project
│ │ └── api
│ │ │ └── index.js
│ ├── server-config
│ │ └── src
│ │ │ ├── modern-app-env.d.ts
│ │ │ └── App.tsx
│ ├── clean-dist-path
│ │ ├── src
│ │ │ └── App.tsx
│ │ └── modern.config.ts
│ ├── custom-dist-path
│ │ └── src
│ │ │ └── App.tsx
│ ├── custom-template
│ │ └── src
│ │ │ ├── App.tsx
│ │ │ └── index.html
│ ├── nonce
│ │ └── src
│ │ │ ├── routes
│ │ │ └── page.tsx
│ │ │ └── modern-app-env.d.ts
│ ├── deploy-server
│ │ └── src
│ │ │ ├── one
│ │ │ └── routes
│ │ │ │ └── page.data.ts
│ │ │ ├── two
│ │ │ └── routes
│ │ │ │ └── page.data.ts
│ │ │ └── modern-app-env.d.ts
│ ├── rsc-csr-app
│ │ ├── .browserslistrc
│ │ └── src
│ │ │ ├── components
│ │ │ ├── Counter.css
│ │ │ ├── DynamicMessage.module.css
│ │ │ └── Suspended.tsx
│ │ │ └── App.module.less
│ ├── rsc-csr-routes
│ │ ├── .browserslistrc
│ │ └── src
│ │ │ └── loader
│ │ │ └── routes
│ │ │ ├── page.data.ts
│ │ │ ├── redirect
│ │ │ ├── page.tsx
│ │ │ └── page.data.ts
│ │ │ └── page.data.client.ts
│ ├── rsc-ssr-app
│ │ ├── .browserslistrc
│ │ └── src
│ │ │ ├── client-component-root
│ │ │ ├── components
│ │ │ │ └── Counter.tsx
│ │ │ └── modern-app-env.d.ts
│ │ │ └── server-component-root
│ │ │ ├── components
│ │ │ └── Counter.css
│ │ │ └── App.module.less
│ ├── rsc-ssr-routes
│ │ ├── .browserslistrc
│ │ └── src
│ │ │ └── loader
│ │ │ └── routes
│ │ │ ├── page.data.ts
│ │ │ ├── redirect
│ │ │ ├── page.tsx
│ │ │ └── page.data.ts
│ │ │ └── page.data.client.ts
│ ├── main-entry-name
│ │ ├── .browserslistrc
│ │ └── src
│ │ │ └── modern-app-env.d.ts
│ ├── entries
│ │ └── fixtures
│ │ │ ├── app-builder
│ │ │ ├── src
│ │ │ │ ├── entry-1
│ │ │ │ │ └── App.tsx
│ │ │ │ └── entry-2
│ │ │ │ │ └── App.tsx
│ │ │ └── modern.config.ts
│ │ │ ├── app-custom
│ │ │ ├── src
│ │ │ │ ├── app-custom
│ │ │ │ │ └── App.tsx
│ │ │ │ └── entry-1
│ │ │ │ │ └── App.tsx
│ │ │ └── modern.config.ts
│ │ │ ├── app-custom-entries
│ │ │ └── src
│ │ │ │ ├── app-custom-entries
│ │ │ │ └── App.tsx
│ │ │ │ ├── entry-1
│ │ │ │ └── App.tsx
│ │ │ │ └── entry-2
│ │ │ │ └── routes
│ │ │ │ └── user
│ │ │ │ └── page.tsx
│ │ │ ├── app-route
│ │ │ └── src
│ │ │ │ ├── routes
│ │ │ │ ├── user
│ │ │ │ │ └── page.tsx
│ │ │ │ └── page.tsx
│ │ │ │ ├── modern-app-env.d.ts
│ │ │ │ └── modern.runtime.ts
│ │ │ ├── app-custom-routes
│ │ │ └── src
│ │ │ │ └── routes
│ │ │ │ ├── page.tsx
│ │ │ │ └── user
│ │ │ │ └── page.tsx
│ │ │ ├── app-entry
│ │ │ └── src
│ │ │ │ └── modern-app-env.d.ts
│ │ │ └── app-server-entry
│ │ │ └── src
│ │ │ └── modern-app-env.d.ts
│ ├── runtime-plugin
│ │ └── fixtures
│ │ │ ├── runtime-custom-config-plugin
│ │ │ └── src
│ │ │ │ └── routes
│ │ │ │ └── page.tsx
│ │ │ └── custom-runtime-plugin
│ │ │ └── modern.config.ts
│ ├── select-entry
│ │ └── fixtures
│ │ │ ├── select-mul-entry
│ │ │ ├── src
│ │ │ │ ├── bar
│ │ │ │ │ └── App.tsx
│ │ │ │ ├── baz
│ │ │ │ │ └── App.tsx
│ │ │ │ └── foo
│ │ │ │ │ └── App.tsx
│ │ │ └── modern.config.ts
│ │ │ └── select-one-entry
│ │ │ ├── src
│ │ │ ├── bar
│ │ │ │ └── App.tsx
│ │ │ ├── baz
│ │ │ │ └── App.tsx
│ │ │ └── foo
│ │ │ │ └── App.tsx
│ │ │ └── modern.config.ts
│ ├── image-component
│ │ └── src
│ │ │ └── routes
│ │ │ ├── crab.png
│ │ │ └── layout.tsx
│ ├── server-routes
│ │ └── src
│ │ │ └── App.tsx
│ ├── rsbuild-hook
│ │ └── src
│ │ │ └── modern-app-env.d.ts
│ ├── ssg
│ │ ├── fixtures
│ │ │ ├── mega-list-routes
│ │ │ │ └── src
│ │ │ │ │ └── routes
│ │ │ │ │ └── layout.jsx
│ │ │ ├── nested-routes
│ │ │ │ └── src
│ │ │ │ │ └── routes
│ │ │ │ │ └── layout.jsx
│ │ │ ├── web-server
│ │ │ │ └── modern-app-env.d.ts
│ │ │ └── simple
│ │ │ │ └── src
│ │ │ │ └── App.jsx
│ │ └── package.json
│ ├── tailwindcss
│ │ └── fixtures
│ │ │ ├── tailwindcss-without-plugin
│ │ │ ├── postcss.config.js
│ │ │ └── modern.config.ts
│ │ │ ├── tailwindcss-v3-js-config-with-postcss-config
│ │ │ ├── postcss.config.ts
│ │ │ └── tailwind.config.js
│ │ │ ├── tailwindcss-v3-js-config
│ │ │ └── tailwind.config.js
│ │ │ ├── tailwindcss-v3-merge-config
│ │ │ └── tailwind.config.ts
│ │ │ ├── tailwindcss-v3-ts-config
│ │ │ └── tailwind.config.ts
│ │ │ ├── twin.macro-v2
│ │ │ └── src
│ │ │ │ └── App.jsx
│ │ │ └── twin.macro-v3
│ │ │ └── src
│ │ │ └── App.jsx
│ ├── temp-dir
│ │ └── src
│ │ │ └── modern-app-env.d.ts
│ ├── custom-file-system-entry
│ │ └── src
│ │ │ └── custom
│ │ │ └── page.tsx
│ ├── server-json-script
│ │ └── src
│ │ │ └── routes
│ │ │ └── page.tsx
│ ├── write-to-dist
│ │ └── src
│ │ │ └── modern-app-env.d.ts
│ └── transform-import
│ │ └── modern.config.ts
├── e2e
│ └── builder
│ │ ├── cases
│ │ ├── node-addons
│ │ │ └── src
│ │ │ │ ├── a.node
│ │ │ │ └── index.js
│ │ ├── output
│ │ │ ├── rem
│ │ │ │ ├── .gitignore
│ │ │ │ └── src
│ │ │ │ │ ├── App.module.less
│ │ │ │ │ ├── App.module.scss
│ │ │ │ │ ├── types.d.ts
│ │ │ │ │ └── assets
│ │ │ │ │ └── icon.png
│ │ │ ├── assets-retry
│ │ │ │ └── src
│ │ │ │ │ └── index.js
│ │ │ ├── externals
│ │ │ │ └── src
│ │ │ │ │ ├── aaa.js
│ │ │ │ │ └── ex.js
│ │ │ ├── assets
│ │ │ │ └── src
│ │ │ │ │ └── icon.png
│ │ │ ├── assets-url
│ │ │ │ └── src
│ │ │ │ │ └── icon.png
│ │ │ ├── assets-inline
│ │ │ │ └── src
│ │ │ │ │ └── icon.png
│ │ │ ├── assets__inline
│ │ │ │ └── src
│ │ │ │ │ └── icon.png
│ │ │ ├── assets-no-inline
│ │ │ │ └── src
│ │ │ │ │ └── icon.png
│ │ │ └── ascii
│ │ │ │ └── src
│ │ │ │ └── index.js
│ │ ├── babel
│ │ │ └── src
│ │ │ │ └── index.js
│ │ ├── dev
│ │ │ ├── .gitignore
│ │ │ ├── hmr
│ │ │ │ └── src
│ │ │ │ │ ├── App.css
│ │ │ │ │ └── App.tsx
│ │ │ └── basic
│ │ │ │ └── src
│ │ │ │ └── App.tsx
│ │ ├── inspect-config
│ │ │ └── src
│ │ │ │ └── index.js
│ │ ├── html
│ │ │ ├── app-icon
│ │ │ │ └── src
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── icon.png
│ │ │ ├── favicon
│ │ │ │ └── src
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── icon.png
│ │ │ ├── cross-origin
│ │ │ │ └── src
│ │ │ │ │ └── index.js
│ │ │ ├── script-loading
│ │ │ │ └── src
│ │ │ │ │ └── index.js
│ │ │ ├── inject-false
│ │ │ │ └── src
│ │ │ │ │ ├── index.css
│ │ │ │ │ └── index.js
│ │ │ ├── mount-id
│ │ │ │ └── src
│ │ │ │ │ └── App.tsx
│ │ │ ├── template
│ │ │ │ └── src
│ │ │ │ │ ├── App.tsx
│ │ │ │ │ └── assets
│ │ │ │ │ └── icon.png
│ │ │ └── minify
│ │ │ │ └── src
│ │ │ │ └── App.tsx
│ │ ├── web-worker
│ │ │ ├── src
│ │ │ │ ├── index.js
│ │ │ │ ├── test.js
│ │ │ │ └── index2.js
│ │ │ └── .browserslistrc
│ │ ├── source
│ │ │ ├── basic
│ │ │ │ └── src
│ │ │ │ │ ├── common
│ │ │ │ │ └── test.js
│ │ │ │ │ ├── App.jsx
│ │ │ │ │ └── pre.js
│ │ │ ├── module-scopes
│ │ │ │ ├── common
│ │ │ │ │ └── test.js
│ │ │ │ └── src
│ │ │ │ │ └── App.jsx
│ │ │ ├── global-vars
│ │ │ │ └── src
│ │ │ │ │ └── types.d.ts
│ │ │ ├── plugin-import
│ │ │ │ ├── foo
│ │ │ │ │ └── lib
│ │ │ │ │ │ ├── foo.js
│ │ │ │ │ │ ├── camelCase.js
│ │ │ │ │ │ ├── kabab-case.js
│ │ │ │ │ │ └── named.js
│ │ │ │ └── src
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── named.js
│ │ │ │ │ ├── camel.js
│ │ │ │ │ └── kebab.js
│ │ │ ├── source-exclude
│ │ │ │ └── src
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── test.js
│ │ │ ├── tsconfig-paths
│ │ │ │ └── src
│ │ │ │ │ ├── common
│ │ │ │ │ └── test.ts
│ │ │ │ │ └── common2
│ │ │ │ │ └── test.ts
│ │ │ ├── source-include
│ │ │ │ └── src
│ │ │ │ │ └── index.js
│ │ │ ├── test.js
│ │ │ └── resolve-extension-prefix
│ │ │ │ └── src
│ │ │ │ ├── App.jsx
│ │ │ │ ├── ex.js
│ │ │ │ └── ex.web.js
│ │ ├── html-tags
│ │ │ └── src
│ │ │ │ ├── foo.ts
│ │ │ │ └── index.ts
│ │ ├── postcss
│ │ │ ├── postcss-config-file
│ │ │ │ └── src
│ │ │ │ │ ├── index.css
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── index.html
│ │ │ └── postcss-function-options
│ │ │ │ └── src
│ │ │ │ ├── bar
│ │ │ │ ├── index.css
│ │ │ │ ├── index.ts
│ │ │ │ └── index.html
│ │ │ │ └── foo
│ │ │ │ ├── index.css
│ │ │ │ ├── index.ts
│ │ │ │ └── index.html
│ │ ├── polyfill
│ │ │ └── src
│ │ │ │ └── index.js
│ │ ├── performance
│ │ │ ├── load-resource
│ │ │ │ └── src
│ │ │ │ │ ├── test.css
│ │ │ │ │ ├── test.png
│ │ │ │ │ ├── page1
│ │ │ │ │ └── icon.png
│ │ │ │ │ ├── page2
│ │ │ │ │ └── App.tsx
│ │ │ │ │ └── test.ts
│ │ │ ├── basic
│ │ │ │ └── src
│ │ │ │ │ └── App.tsx
│ │ │ └── removeConsole
│ │ │ │ └── src
│ │ │ │ └── index.js
│ │ ├── inline-chunk
│ │ │ └── src
│ │ │ │ ├── style.css
│ │ │ │ ├── foo.js
│ │ │ │ └── another.js
│ │ ├── check-syntax
│ │ │ └── fixtures
│ │ │ │ ├── basic
│ │ │ │ └── src
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── test.js
│ │ │ │ └── esnext
│ │ │ │ └── src
│ │ │ │ ├── index.js
│ │ │ │ └── test.js
│ │ ├── moment
│ │ │ ├── src
│ │ │ │ └── index.js
│ │ │ └── package.json
│ │ ├── source-map
│ │ │ └── src
│ │ │ │ └── App.jsx
│ │ ├── wasm
│ │ │ ├── wasm-async
│ │ │ │ └── src
│ │ │ │ │ └── factorial.wasm
│ │ │ ├── wasm-basic
│ │ │ │ └── src
│ │ │ │ │ ├── factorial.wasm
│ │ │ │ │ └── index.js
│ │ │ └── wasm-url
│ │ │ │ └── src
│ │ │ │ ├── factorial.wasm
│ │ │ │ └── index.js
│ │ └── sri
│ │ │ └── src
│ │ │ └── App.jsx
│ │ ├── .gitignore
│ │ └── playwright.config.ts
├── setEnvVars.js
├── jest-puppeteer.config.js
├── tsconfig.json
└── utils
│ └── jest.setup.js
├── .gitattributes
├── packages
├── server
│ ├── server
│ │ ├── tests
│ │ │ ├── fixtures
│ │ │ │ ├── watch
│ │ │ │ │ ├── stats.txt
│ │ │ │ │ ├── a.ts
│ │ │ │ │ └── index.ts
│ │ │ │ ├── mock
│ │ │ │ │ ├── zero
│ │ │ │ │ │ └── config
│ │ │ │ │ │ │ └── mock
│ │ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── module-error
│ │ │ │ │ │ └── config
│ │ │ │ │ │ │ └── mock
│ │ │ │ │ │ │ └── index.ts
│ │ │ │ │ └── type-error
│ │ │ │ │ │ └── config
│ │ │ │ │ │ └── mock
│ │ │ │ │ │ └── index.ts
│ │ │ │ └── pure
│ │ │ │ │ ├── modern.config.js
│ │ │ │ │ └── test-dist
│ │ │ │ │ └── bundles
│ │ │ │ │ └── test.js
│ │ │ └── helper.ts
│ │ ├── src
│ │ │ ├── helpers
│ │ │ │ └── utils.ts
│ │ │ └── dev-tools
│ │ │ │ └── https
│ │ │ │ └── global.d.ts
│ │ └── modern.config.js
│ ├── utils
│ │ ├── tests
│ │ │ └── fixtures
│ │ │ │ ├── es-example
│ │ │ │ ├── server
│ │ │ │ │ ├── foo.md
│ │ │ │ │ └── index.js
│ │ │ │ ├── src
│ │ │ │ │ └── index.js
│ │ │ │ ├── shared
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── runtime
│ │ │ │ │ │ └── server.js
│ │ │ │ └── api
│ │ │ │ │ └── map-alias.js
│ │ │ │ ├── ts-example
│ │ │ │ ├── server
│ │ │ │ │ ├── foo.md
│ │ │ │ │ └── index.ts
│ │ │ │ ├── src
│ │ │ │ │ └── index.ts
│ │ │ │ ├── shared
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── runtime
│ │ │ │ │ │ └── server.ts
│ │ │ │ ├── api
│ │ │ │ │ └── map-alias.ts
│ │ │ │ └── modern-app-env.d.ts
│ │ │ │ └── api
│ │ │ │ └── _app.ts
│ │ ├── src
│ │ │ ├── type.d.ts
│ │ │ └── index.ts
│ │ └── modern.config.js
│ ├── babel-plugin-module-resolver
│ │ ├── tests
│ │ │ └── testproject
│ │ │ │ ├── src
│ │ │ │ ├── app.js
│ │ │ │ ├── text.txt
│ │ │ │ ├── constants.js
│ │ │ │ ├── es6module.es6
│ │ │ │ ├── nodemodule.mjs
│ │ │ │ ├── rn
│ │ │ │ │ ├── index.ios.js
│ │ │ │ │ └── index.android.js
│ │ │ │ ├── actions
│ │ │ │ │ └── something.js
│ │ │ │ ├── components
│ │ │ │ │ ├── App.js
│ │ │ │ │ ├── Root.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── Header
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ ├── SubHeader.js
│ │ │ │ │ │ └── header.css
│ │ │ │ │ └── Sidebar
│ │ │ │ │ │ └── Footer
│ │ │ │ │ │ ├── index.js
│ │ │ │ │ │ └── SidebarFooterButton.js
│ │ │ │ ├── constants
│ │ │ │ │ └── actions.js
│ │ │ │ └── libs
│ │ │ │ │ └── custom.modernizr3.js
│ │ │ │ ├── .babelrc
│ │ │ │ ├── example-file.js
│ │ │ │ ├── package.json
│ │ │ │ └── test
│ │ │ │ └── tools.js
│ │ ├── modern.config.js
│ │ └── src
│ │ │ └── log.js
│ ├── core
│ │ ├── tests
│ │ │ └── fixtures
│ │ │ │ ├── serverEnv
│ │ │ │ ├── .env
│ │ │ │ ├── .env.prod
│ │ │ │ └── .env.test
│ │ │ │ ├── mock
│ │ │ │ ├── zero
│ │ │ │ │ └── config
│ │ │ │ │ │ └── mock
│ │ │ │ │ │ └── index.ts
│ │ │ │ ├── module-error
│ │ │ │ │ └── config
│ │ │ │ │ │ └── mock
│ │ │ │ │ │ └── index.ts
│ │ │ │ └── type-error
│ │ │ │ │ └── config
│ │ │ │ │ └── mock
│ │ │ │ │ └── index.ts
│ │ │ │ ├── load-plugins
│ │ │ │ ├── test-a
│ │ │ │ │ ├── package.json
│ │ │ │ │ └── index.js
│ │ │ │ └── package.json
│ │ │ │ └── render
│ │ │ │ ├── ssr
│ │ │ │ ├── user.html
│ │ │ │ └── bundles
│ │ │ │ │ ├── main-server-loaders.js
│ │ │ │ │ └── user-server-loaders.js
│ │ │ │ └── csr
│ │ │ │ └── index.html
│ │ └── src
│ │ │ ├── adapters
│ │ │ └── node
│ │ │ │ └── plugins
│ │ │ │ └── index.ts
│ │ │ ├── types
│ │ │ ├── index.ts
│ │ │ └── config
│ │ │ │ ├── dev.ts
│ │ │ │ └── security.ts
│ │ │ └── context.ts
│ ├── bff-core
│ │ ├── src
│ │ │ ├── client
│ │ │ │ └── index.ts
│ │ │ └── utils
│ │ │ │ ├── debug.ts
│ │ │ │ └── index.ts
│ │ └── tests
│ │ │ └── fixtures
│ │ │ └── function
│ │ │ └── [id]
│ │ │ └── origin
│ │ │ ├── bar.ts
│ │ │ ├── baz.ts
│ │ │ └── foo.ts
│ ├── create-request
│ │ ├── env.d.ts
│ │ └── modern.config.js
│ ├── server-runtime
│ │ ├── src
│ │ │ └── cache.ts
│ │ └── modern.config.js
│ ├── prod-server
│ │ ├── src
│ │ │ └── modern-app-env.d.ts
│ │ └── modern.config.js
│ ├── bff-runtime
│ │ └── modern.config.js
│ └── plugin-polyfill
│ │ ├── modern.config.js
│ │ └── src
│ │ ├── type.ts
│ │ └── const.ts
├── toolkit
│ ├── utils
│ │ ├── tests
│ │ │ └── fixtures
│ │ │ │ ├── file-exists
│ │ │ │ ├── a.ejs
│ │ │ │ ├── a.mjs
│ │ │ │ ├── a.ts
│ │ │ │ └── a.js
│ │ │ │ │ └── .gitkeep
│ │ │ │ ├── compat-require
│ │ │ │ ├── empty.js
│ │ │ │ ├── cjs.js
│ │ │ │ ├── foo.js
│ │ │ │ └── esm.js
│ │ │ │ ├── plugin
│ │ │ │ └── package.json
│ │ │ │ └── browserlist
│ │ │ │ ├── dotfile
│ │ │ │ └── .browserslistrc
│ │ │ │ └── pkg
│ │ │ │ └── package.json
│ │ ├── src
│ │ │ ├── universal
│ │ │ │ ├── index.ts
│ │ │ │ └── path.ts
│ │ │ ├── cli
│ │ │ │ ├── logger.ts
│ │ │ │ └── is
│ │ │ │ │ └── index.ts
│ │ │ └── index.ts
│ │ └── compiled
│ │ │ ├── mime-types
│ │ │ └── package.json
│ │ │ ├── semver
│ │ │ └── package.json
│ │ │ ├── react-server-dom-webpack
│ │ │ ├── client.js
│ │ │ └── README.md
│ │ │ ├── dotenv
│ │ │ └── package.json
│ │ │ ├── chalk
│ │ │ └── package.json
│ │ │ ├── debug
│ │ │ └── package.json
│ │ │ ├── chokidar
│ │ │ └── fsevents.node
│ │ │ ├── fs-extra
│ │ │ └── package.json
│ │ │ ├── inquirer
│ │ │ └── package.json
│ │ │ ├── js-yaml
│ │ │ └── package.json
│ │ │ ├── lodash
│ │ │ ├── package.json
│ │ │ └── index.js
│ │ │ ├── dotenv-expand
│ │ │ └── package.json
│ │ │ ├── json5
│ │ │ ├── lib
│ │ │ │ └── index.d.ts
│ │ │ └── package.json
│ │ │ ├── tsconfig-paths
│ │ │ └── package.json
│ │ │ ├── address
│ │ │ └── package.json
│ │ │ ├── commander
│ │ │ └── package.json
│ │ │ ├── url-join
│ │ │ └── package.json
│ │ │ ├── slash
│ │ │ └── package.json
│ │ │ ├── filesize
│ │ │ └── package.json
│ │ │ ├── minimist
│ │ │ └── package.json
│ │ │ ├── pkg-up
│ │ │ └── package.json
│ │ │ ├── upath
│ │ │ └── package.json
│ │ │ ├── webpack-chain
│ │ │ └── package.json
│ │ │ ├── fast-glob
│ │ │ └── package.json
│ │ │ ├── strip-ansi
│ │ │ └── package.json
│ │ │ ├── import-lazy
│ │ │ └── package.json
│ │ │ └── glob
│ │ │ └── package.json
│ ├── compiler
│ │ └── babel
│ │ │ ├── tests
│ │ │ └── fixtures
│ │ │ │ ├── build
│ │ │ │ └── src
│ │ │ │ │ ├── far.js
│ │ │ │ │ ├── index.js
│ │ │ │ │ ├── error
│ │ │ │ │ └── error1
│ │ │ │ ├── lib
│ │ │ │ └── src
│ │ │ │ │ └── index.js
│ │ │ │ ├── buildWatch
│ │ │ │ └── src
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── error
│ │ │ │ ├── getFinalOption
│ │ │ │ ├── sourceDir
│ │ │ │ │ └── bar.js
│ │ │ │ └── watchDir
│ │ │ │ │ ├── far.js
│ │ │ │ │ └── foo.jsx
│ │ │ │ ├── utils
│ │ │ │ └── far
│ │ │ │ ├── resolveSourceMap
│ │ │ │ └── src
│ │ │ │ │ └── index.js
│ │ │ │ └── compiler
│ │ │ │ └── src
│ │ │ │ └── index.js
│ │ │ ├── src
│ │ │ └── constants.ts
│ │ │ └── modern.config.js
│ ├── runtime-utils
│ │ ├── tests
│ │ │ └── fixtures
│ │ │ │ └── fileReader
│ │ │ │ ├── .gitignore
│ │ │ │ └── index.ts
│ │ └── src
│ │ │ ├── server
│ │ │ └── index.ts
│ │ │ ├── browser
│ │ │ └── index.ts
│ │ │ └── rsc.ts
│ ├── node-bundle-require
│ │ ├── tests
│ │ │ ├── fixture
│ │ │ │ ├── test-package-esm
│ │ │ │ │ ├── index.js
│ │ │ │ │ └── package.json
│ │ │ │ ├── test-package-esm-with-cjs
│ │ │ │ │ ├── index.mjs
│ │ │ │ │ ├── index.cjs
│ │ │ │ │ └── package.json
│ │ │ │ ├── input.ts
│ │ │ │ ├── test-package-ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── package.json
│ │ │ │ ├── a.ts
│ │ │ │ ├── inputImportEsm.ts
│ │ │ │ ├── inputImportTs.ts
│ │ │ │ └── inputImportEsmWithCjs.ts
│ │ │ └── modern-app-env.d.ts
│ │ ├── src
│ │ │ └── modern-app-env.d.ts
│ │ └── modern.config.js
│ ├── types
│ │ ├── server
│ │ │ └── bff.d.ts
│ │ ├── index.d.ts
│ │ └── modern.config.js
│ ├── plugin
│ │ ├── src
│ │ │ ├── runtime
│ │ │ │ └── run
│ │ │ │ │ └── index.ts
│ │ │ ├── cli
│ │ │ │ └── run
│ │ │ │ │ └── utils
│ │ │ │ │ └── debug.ts
│ │ │ └── server
│ │ │ │ └── run
│ │ │ │ └── index.ts
│ │ └── modern.config.js
│ ├── create
│ │ └── modern.config.js
│ └── upgrade
│ │ └── modern.config.js
├── document
│ └── main-doc
│ │ ├── docs
│ │ ├── en
│ │ │ ├── components
│ │ │ │ ├── entry-mode.mdx
│ │ │ │ ├── other-plugins.mdx
│ │ │ │ ├── upgrade-faq.mdx
│ │ │ │ ├── router-legacy-tip.mdx
│ │ │ │ ├── routes-practice.mdx
│ │ │ │ ├── runtime-cli-config.mdx
│ │ │ │ ├── stream-ssr-performance.mdx
│ │ │ │ ├── output-asset-prefix-extend.mdx
│ │ │ │ ├── convention-routing-motivation.mdx
│ │ │ │ ├── ssr-monitor.mdx
│ │ │ │ ├── turtorials-example-list.mdx
│ │ │ │ ├── deploy.mdx
│ │ │ │ ├── rspackTip.mdx
│ │ │ │ ├── language-config.mdx
│ │ │ │ ├── init-rspack-app.mdx
│ │ │ │ └── enable-bff-caution.mdx
│ │ │ ├── guides
│ │ │ │ ├── concept
│ │ │ │ │ └── _meta.json
│ │ │ │ ├── troubleshooting
│ │ │ │ │ └── _meta.json
│ │ │ │ ├── advanced-features
│ │ │ │ │ ├── server-monitor
│ │ │ │ │ │ └── _meta.json
│ │ │ │ │ ├── bff
│ │ │ │ │ │ ├── _meta.json
│ │ │ │ │ │ └── upload.mdx
│ │ │ │ │ └── page-performance
│ │ │ │ │ │ └── _meta.json
│ │ │ │ ├── basic-features
│ │ │ │ │ ├── data
│ │ │ │ │ │ └── _meta.json
│ │ │ │ │ ├── testing
│ │ │ │ │ │ └── _meta.json
│ │ │ │ │ ├── css
│ │ │ │ │ │ └── _meta.json
│ │ │ │ │ ├── debug
│ │ │ │ │ │ └── _meta.json
│ │ │ │ │ ├── static-assets
│ │ │ │ │ │ └── _meta.json
│ │ │ │ │ └── render
│ │ │ │ │ │ └── _meta.json
│ │ │ │ ├── get-started
│ │ │ │ │ └── _meta.json
│ │ │ │ └── topic-detail
│ │ │ │ │ ├── module-federation
│ │ │ │ │ └── _meta.json
│ │ │ │ │ └── _meta.json
│ │ │ ├── plugin
│ │ │ │ ├── cli-plugins
│ │ │ │ │ └── _meta.json
│ │ │ │ ├── runtime-plugins
│ │ │ │ │ └── _meta.json
│ │ │ │ ├── server-plugins
│ │ │ │ │ ├── api.mdx
│ │ │ │ │ └── life-cycle.mdx
│ │ │ │ └── official
│ │ │ │ │ ├── cli-plugins
│ │ │ │ │ └── _meta.json
│ │ │ │ │ └── _meta.json
│ │ │ ├── apis
│ │ │ │ └── app
│ │ │ │ │ └── hooks
│ │ │ │ │ └── config
│ │ │ │ │ └── _meta.json
│ │ │ ├── community
│ │ │ │ └── blog
│ │ │ │ │ └── _meta.json
│ │ │ └── index.md
│ │ └── zh
│ │ │ ├── components
│ │ │ ├── entry-mode.mdx
│ │ │ ├── other-plugins.mdx
│ │ │ ├── upgrade-faq.mdx
│ │ │ ├── router-legacy-tip.mdx
│ │ │ ├── routes-practice.mdx
│ │ │ ├── runtime-cli-config.mdx
│ │ │ ├── stream-ssr-performance.mdx
│ │ │ ├── output-asset-prefix-extend.mdx
│ │ │ ├── convention-routing-motivation.mdx
│ │ │ ├── ssr-monitor.mdx
│ │ │ ├── default-mwa-generate.mdx
│ │ │ ├── deploy.mdx
│ │ │ ├── turtorials-example-list.mdx
│ │ │ ├── enable-bff-caution.mdx
│ │ │ ├── init-rspack-app.mdx
│ │ │ ├── release-note.mdx
│ │ │ ├── extend-bff-function.mdx
│ │ │ ├── language-config.mdx
│ │ │ ├── rspackTip.mdx
│ │ │ ├── package-manager.mdx
│ │ │ └── tech-stack-node-framework.mdx
│ │ │ ├── guides
│ │ │ ├── concept
│ │ │ │ └── _meta.json
│ │ │ ├── troubleshooting
│ │ │ │ └── _meta.json
│ │ │ ├── advanced-features
│ │ │ │ ├── server-monitor
│ │ │ │ │ └── _meta.json
│ │ │ │ ├── bff
│ │ │ │ │ ├── _meta.json
│ │ │ │ │ └── upload.mdx
│ │ │ │ └── page-performance
│ │ │ │ │ └── _meta.json
│ │ │ ├── basic-features
│ │ │ │ ├── data
│ │ │ │ │ └── _meta.json
│ │ │ │ ├── testing
│ │ │ │ │ └── _meta.json
│ │ │ │ ├── css
│ │ │ │ │ └── _meta.json
│ │ │ │ ├── debug
│ │ │ │ │ └── _meta.json
│ │ │ │ ├── static-assets
│ │ │ │ │ └── _meta.json
│ │ │ │ └── render
│ │ │ │ │ └── _meta.json
│ │ │ ├── get-started
│ │ │ │ └── _meta.json
│ │ │ └── topic-detail
│ │ │ │ ├── module-federation
│ │ │ │ └── _meta.json
│ │ │ │ └── _meta.json
│ │ │ ├── plugin
│ │ │ ├── server-plugins
│ │ │ │ ├── api.mdx
│ │ │ │ └── life-cycle.mdx
│ │ │ ├── cli-plugins
│ │ │ │ └── _meta.json
│ │ │ ├── runtime-plugins
│ │ │ │ └── _meta.json
│ │ │ └── official
│ │ │ │ ├── cli-plugins
│ │ │ │ └── _meta.json
│ │ │ │ └── _meta.json
│ │ │ ├── index.md
│ │ │ ├── apis
│ │ │ └── app
│ │ │ │ └── hooks
│ │ │ │ ├── config
│ │ │ │ ├── _meta.json
│ │ │ │ └── mock.mdx
│ │ │ │ └── shared.mdx
│ │ │ └── community
│ │ │ └── blog
│ │ │ └── _meta.json
│ │ ├── src
│ │ └── index.ts
│ │ └── static
│ │ └── img
│ │ └── favicon.ico
├── generator
│ ├── new-action
│ │ ├── tests
│ │ │ ├── fixtures
│ │ │ │ ├── none.json
│ │ │ │ ├── mwa.json
│ │ │ │ └── err.json
│ │ │ └── index.test.ts
│ │ ├── src
│ │ │ └── index.ts
│ │ └── modern.config.js
│ ├── generator-common
│ │ ├── src
│ │ │ ├── base
│ │ │ │ └── index.ts
│ │ │ ├── expand
│ │ │ │ └── index.ts
│ │ │ ├── mwa
│ │ │ │ └── index.ts
│ │ │ ├── newAction
│ │ │ │ └── index.ts
│ │ │ └── index.ts
│ │ ├── modern.config.js
│ │ └── tests
│ │ │ └── tsconfig.json
│ ├── generators
│ │ ├── base-generator
│ │ │ ├── templates
│ │ │ │ ├── base-template
│ │ │ │ │ └── .nvmrc
│ │ │ │ └── pnpm-template
│ │ │ │ │ └── npmrc.handlebars
│ │ │ └── modern.config.js
│ │ ├── packages-generator
│ │ │ ├── src
│ │ │ │ └── modern-app-env.d.ts
│ │ │ └── modern.config.js
│ │ ├── bff-generator
│ │ │ ├── src
│ │ │ │ └── locale
│ │ │ │ │ ├── zh.ts
│ │ │ │ │ └── en.ts
│ │ │ └── modern.config.js
│ │ ├── ssg-generator
│ │ │ ├── src
│ │ │ │ └── locale
│ │ │ │ │ ├── zh.ts
│ │ │ │ │ └── en.ts
│ │ │ └── modern.config.js
│ │ ├── dependence-generator
│ │ │ ├── src
│ │ │ │ └── locale
│ │ │ │ │ ├── zh.ts
│ │ │ │ │ └── en.ts
│ │ │ └── modern.config.js
│ │ ├── entry-generator
│ │ │ ├── src
│ │ │ │ └── locale
│ │ │ │ │ ├── zh.ts
│ │ │ │ │ └── en.ts
│ │ │ └── modern.config.js
│ │ ├── mwa-generator
│ │ │ ├── templates
│ │ │ │ ├── base-template
│ │ │ │ │ └── .browserslistrc.handlebars
│ │ │ │ ├── js-template
│ │ │ │ │ └── src
│ │ │ │ │ │ └── modern.runtime.js.handlebars
│ │ │ │ └── ts-template
│ │ │ │ │ └── src
│ │ │ │ │ └── modern.runtime.ts.handlebars
│ │ │ └── modern.config.js
│ │ ├── server-generator
│ │ │ └── modern.config.js
│ │ ├── tailwindcss-generator
│ │ │ ├── modern.config.js
│ │ │ └── templates
│ │ │ │ ├── js-template
│ │ │ │ └── tailwind.config.js
│ │ │ │ └── ts-template
│ │ │ │ └── tailwind.config.ts
│ │ └── upgrade-generator
│ │ │ └── modern.config.js
│ ├── sandpack-react
│ │ ├── scripts
│ │ │ └── codesandbox
│ │ │ │ └── .codesandbox
│ │ │ │ └── environment.json
│ │ ├── .gitignore
│ │ ├── src
│ │ │ └── templates
│ │ │ │ └── index.ts
│ │ └── modern.config.js
│ ├── generator-utils
│ │ ├── modern.config.js
│ │ └── src
│ │ │ ├── locale
│ │ │ ├── zh.ts
│ │ │ └── en.ts
│ │ │ └── utils
│ │ │ └── index.ts
│ └── generator-cases
│ │ └── modern.config.js
├── cli
│ ├── babel-preset
│ │ ├── src
│ │ │ └── index.ts
│ │ └── modern.config.ts
│ ├── plugin-bff
│ │ ├── src
│ │ │ ├── index.ts
│ │ │ └── runtime
│ │ │ │ ├── hono
│ │ │ │ └── index.ts
│ │ │ │ └── create-request
│ │ │ │ └── index.ts
│ │ ├── cli.js
│ │ ├── server.js
│ │ ├── tests
│ │ │ ├── fixtures
│ │ │ │ ├── testFetcher.ts
│ │ │ │ ├── requestCreator
│ │ │ │ │ ├── client.ts
│ │ │ │ │ └── server.ts
│ │ │ │ └── function
│ │ │ │ │ └── api
│ │ │ │ │ ├── hello.ts
│ │ │ │ │ ├── upload.ts
│ │ │ │ │ └── user
│ │ │ │ │ └── [id].ts
│ │ │ └── helper.ts
│ │ ├── types.d.ts
│ │ └── modern.config.js
│ ├── builder
│ │ ├── compiled
│ │ │ └── postcss-load-config
│ │ │ │ └── index.d.ts
│ │ └── modern.config.ts
│ ├── plugin-ssg
│ │ ├── src
│ │ │ ├── global.d.ts
│ │ │ └── server
│ │ │ │ └── consts.ts
│ │ └── modern.config.js
│ ├── flight-server-transform-plugin
│ │ ├── .gitignore
│ │ ├── tests
│ │ │ └── fixture
│ │ │ │ └── default-actions
│ │ │ │ ├── arrow
│ │ │ │ └── input.tsx
│ │ │ │ └── function-decl
│ │ │ │ └── input.tsx
│ │ └── flight_server_transform_plugin.wasm
│ ├── plugin-tailwind
│ │ ├── src
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ ├── tests
│ │ │ ├── fixtures
│ │ │ │ └── twin-macro
│ │ │ │ │ └── package.json
│ │ │ └── index.test.ts
│ │ └── modern.config.js
│ ├── plugin-styled-components
│ │ ├── src
│ │ │ └── styled.ts
│ │ └── modern.config.js
│ ├── plugin-i18n
│ │ └── modern.config.js
│ └── plugin-data-loader
│ │ ├── modern.config.js
│ │ └── src
│ │ └── common
│ │ └── constants.ts
├── solutions
│ └── app-tools
│ │ ├── tests
│ │ ├── builder
│ │ │ └── fixtures
│ │ │ │ └── icons
│ │ │ │ ├── favicon.svg
│ │ │ │ ├── icon.png
│ │ │ │ └── icon.svg
│ │ ├── analyze
│ │ │ └── fixtures
│ │ │ │ ├── default-export
│ │ │ │ ├── no-export.js
│ │ │ │ ├── arrow-function.ts
│ │ │ │ ├── function.ts
│ │ │ │ ├── no-default-export.js
│ │ │ │ ├── named-function.ts
│ │ │ │ └── export-variable.ts
│ │ │ │ ├── entries
│ │ │ │ ├── no-entry
│ │ │ │ │ └── src
│ │ │ │ │ │ └── common
│ │ │ │ │ │ └── util.tsx
│ │ │ │ └── single-entry
│ │ │ │ │ └── src
│ │ │ │ │ └── App.tsx
│ │ │ │ ├── html-templates
│ │ │ │ ├── no-config
│ │ │ │ │ └── .gitkeep
│ │ │ │ ├── custom-index
│ │ │ │ │ └── config
│ │ │ │ │ │ └── html
│ │ │ │ │ │ ├── index.html
│ │ │ │ │ │ └── page-a
│ │ │ │ │ │ └── index.html
│ │ │ │ └── custom-partial
│ │ │ │ │ └── config
│ │ │ │ │ └── html
│ │ │ │ │ ├── body.ejs
│ │ │ │ │ ├── page-a
│ │ │ │ │ ├── head.html
│ │ │ │ │ └── index.html
│ │ │ │ │ ├── page-b
│ │ │ │ │ ├── body.html
│ │ │ │ │ └── top.html
│ │ │ │ │ └── head.html
│ │ │ │ └── server-routes
│ │ │ │ ├── no-config
│ │ │ │ └── .gitkeep
│ │ │ │ └── has-config
│ │ │ │ └── config
│ │ │ │ └── public
│ │ │ │ ├── wx.txt
│ │ │ │ ├── b
│ │ │ │ ├── info.js
│ │ │ │ └── about
│ │ │ │ │ └── logo.png
│ │ │ │ └── test.json
│ │ ├── fixtures
│ │ │ ├── utils
│ │ │ │ └── modern.server-runtime.config.js
│ │ │ └── subcommand
│ │ │ │ ├── config.ts
│ │ │ │ ├── mockPlugin.ts
│ │ │ │ ├── src
│ │ │ │ └── index.ts
│ │ │ │ └── package.json
│ │ ├── routes
│ │ │ └── fixtures
│ │ │ │ ├── router-plugin2
│ │ │ │ ├── index.js
│ │ │ │ └── bar.js
│ │ │ │ ├── router-plugin1
│ │ │ │ ├── index.js
│ │ │ │ └── routes
│ │ │ │ │ └── bar.js
│ │ │ │ └── router-plugin3
│ │ │ │ ├── index.js
│ │ │ │ └── routes
│ │ │ │ └── bar.js
│ │ └── commands
│ │ │ └── dev.test.ts
│ │ └── src
│ │ ├── config
│ │ └── index.ts
│ │ ├── plugins
│ │ ├── deploy
│ │ │ └── platforms
│ │ │ │ ├── netlify-entry.mjs
│ │ │ │ ├── vercel-entry.mjs
│ │ │ │ ├── vercel-entry.js
│ │ │ │ └── netlify-entry.cjs
│ │ └── analyze
│ │ │ └── constants.ts
│ │ ├── builder
│ │ └── shared
│ │ │ ├── index.ts
│ │ │ ├── bundlerPlugins
│ │ │ └── index.ts
│ │ │ └── builderPlugins
│ │ │ └── index.ts
│ │ ├── types
│ │ ├── utils.ts
│ │ └── config
│ │ │ ├── resolve.ts
│ │ │ └── security.ts
│ │ ├── constants.ts
│ │ └── exports
│ │ └── server.ts
└── runtime
│ ├── plugin-runtime
│ ├── static
│ │ ├── modern-run-window-fn.js
│ │ └── modern-run-router-data-fn.js
│ ├── tests
│ │ ├── router
│ │ │ └── fixtures
│ │ │ │ └── nested-routes
│ │ │ │ ├── layout.tsx
│ │ │ │ ├── user
│ │ │ │ ├── $.tsx
│ │ │ │ ├── layout.tsx
│ │ │ │ ├── page.tsx
│ │ │ │ ├── $.config.ts
│ │ │ │ ├── [id]
│ │ │ │ │ ├── page.tsx
│ │ │ │ │ └── page.data.ts
│ │ │ │ ├── page.loader.ts
│ │ │ │ ├── $.data.client.ts
│ │ │ │ ├── layout.loader.ts
│ │ │ │ ├── profile
│ │ │ │ │ ├── layout.tsx
│ │ │ │ │ ├── page.tsx
│ │ │ │ │ └── page.loader.ts
│ │ │ │ ├── components
│ │ │ │ │ └── index.tsx
│ │ │ │ ├── page.config.ts
│ │ │ │ ├── layout.config.ts
│ │ │ │ └── $.data.ts
│ │ │ │ ├── __auth
│ │ │ │ ├── layout.tsx
│ │ │ │ ├── __shop
│ │ │ │ │ ├── layout.tsx
│ │ │ │ │ └── item
│ │ │ │ │ │ └── page.tsx
│ │ │ │ ├── layout.loader.tsx
│ │ │ │ ├── login
│ │ │ │ │ └── page.tsx
│ │ │ │ └── layout.config.ts
│ │ │ │ ├── layout.loader.ts
│ │ │ │ ├── user.profile.name
│ │ │ │ ├── layout.tsx
│ │ │ │ ├── page.tsx
│ │ │ │ ├── page.config.ts
│ │ │ │ └── layout.config.ts
│ │ │ │ └── layout.config.ts
│ │ ├── utils
│ │ │ └── index.ts
│ │ ├── document
│ │ │ └── feature
│ │ │ │ ├── document
│ │ │ │ └── _tempTsconfig.json
│ │ │ │ ├── document.tsx
│ │ │ │ └── src
│ │ │ │ └── Document.tsx
│ │ └── ssr
│ │ │ └── fixtures
│ │ │ └── streaming-ssr
│ │ │ └── Home.tsx
│ ├── src
│ │ ├── router
│ │ │ ├── index.ts
│ │ │ ├── runtime
│ │ │ │ ├── server.ts
│ │ │ │ ├── rsc.tsx
│ │ │ │ └── DeferredDataScripts.tsx
│ │ │ ├── cli
│ │ │ │ └── code
│ │ │ │ │ └── getClientRoutes
│ │ │ │ │ └── index.ts
│ │ │ └── internal.ts
│ │ ├── cache
│ │ │ └── index.ts
│ │ ├── core
│ │ │ ├── server
│ │ │ │ └── react
│ │ │ │ │ └── index.ts
│ │ │ └── context
│ │ │ │ ├── request
│ │ │ │ └── index.tsx
│ │ │ │ └── monitors
│ │ │ │ └── index.ts
│ │ ├── exports
│ │ │ ├── head.ts
│ │ │ └── loadable.ts
│ │ ├── document
│ │ │ ├── type.d.ts
│ │ │ ├── Title.tsx
│ │ │ └── Links.tsx
│ │ ├── rsc
│ │ │ └── client.ts
│ │ └── config.ts
│ ├── .gitignore
│ ├── types
│ │ └── index.d.ts
│ └── modern.config.js
│ ├── render
│ ├── env.d.ts
│ ├── src
│ │ └── server
│ │ │ ├── rsc
│ │ │ └── index.ts
│ │ │ └── ssr
│ │ │ └── index.ts
│ └── modern.config.js
│ └── plugin-image
│ ├── src
│ ├── types.ts
│ ├── runtime.ts
│ └── index.ts
│ └── .gitignore
├── scripts
├── prebundle
│ ├── src
│ │ └── global.d.ts
│ └── tsconfig.json
├── check-changeset
│ └── tsconfig.json
├── release-note
│ └── tsconfig.json
├── release-version
│ └── tsconfig.json
├── update-codesmith
│ └── tsconfig.json
└── lint-package-json
│ └── tsconfig.json
├── assets
└── modernjs-banner.png
├── .prettierrc
├── .changeset
├── silly-carpets-mix.md
├── quick-taxis-beam.md
├── silver-bars-shave.md
├── beige-memes-relax.md
├── hungry-stars-end.md
├── plain-numbers-dance.md
├── violet-plants-rescue.md
├── cool-numbers-laugh.md
├── young-comics-drive.md
├── huge-moons-chew.md
├── old-cougars-ring.md
├── shaggy-wombats-peel.md
├── short-hornets-smile.md
├── clever-views-smile.md
├── bitter-cars-drive.md
├── easy-donkeys-work.md
├── brave-years-jump.md
├── wide-humans-tease.md
├── kind-buses-stick.md
└── curvy-kids-knock.md
├── .npmrc
├── .github
└── ISSUE_TEMPLATE
│ └── config.yml
└── CONTRIBUTING.md
/.nvmrc:
--------------------------------------------------------------------------------
1 | lts/jod
2 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | *.handlebars
2 |
--------------------------------------------------------------------------------
/tests/integration/bff-hono/CHANGELOG.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/one/App.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/node-addons/src/a.node:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/integration/app-document/.gitignore:
--------------------------------------------------------------------------------
1 | dist-*
2 |
--------------------------------------------------------------------------------
/tests/integration/bff-hono/.env:
--------------------------------------------------------------------------------
1 | TEST_ENV=default
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | pnpm-lock.yaml merge=ours
2 |
--------------------------------------------------------------------------------
/packages/server/server/tests/fixtures/watch/stats.txt:
--------------------------------------------------------------------------------
1 | 1
--------------------------------------------------------------------------------
/packages/toolkit/utils/tests/fixtures/file-exists/a.ejs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/tests/fixtures/file-exists/a.mjs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/tests/fixtures/file-exists/a.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/output/rem/.gitignore:
--------------------------------------------------------------------------------
1 | dist-*
2 |
--------------------------------------------------------------------------------
/tests/setEnvVars.js:
--------------------------------------------------------------------------------
1 | process.env.IS_REACT18 = 'true';
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/entry-mode.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/other-plugins.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/upgrade-faq.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/entry-mode.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/other-plugins.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/upgrade-faq.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/generator/new-action/tests/fixtures/none.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/packages/server/utils/tests/fixtures/es-example/server/foo.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/utils/tests/fixtures/ts-example/server/foo.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/tests/fixtures/build/src/far.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/tests/fixtures/lib/src/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/tests/fixtures/file-exists/a.js/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/babel/src/index.js:
--------------------------------------------------------------------------------
1 | window.a = 10;
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/dev/.gitignore:
--------------------------------------------------------------------------------
1 | test-*
2 | dist-1
3 |
--------------------------------------------------------------------------------
/tests/integration/bff-hono/.env.staging:
--------------------------------------------------------------------------------
1 | TEST_ENV=staging
2 |
--------------------------------------------------------------------------------
/tests/integration/builder-plugins/src/entry.ts:
--------------------------------------------------------------------------------
1 | // empty
2 |
--------------------------------------------------------------------------------
/packages/cli/babel-preset/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './types';
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/router-legacy-tip.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/routes-practice.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/runtime-cli-config.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/router-legacy-tip.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/routes-practice.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/runtime-cli-config.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/tests/fixtures/build/src/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/scripts/prebundle/src/global.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@vercel/ncc';
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/inspect-config/src/index.js:
--------------------------------------------------------------------------------
1 | // empty
2 |
--------------------------------------------------------------------------------
/packages/cli/plugin-bff/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './constants';
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/stream-ssr-performance.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/stream-ssr-performance.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/app.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/core/tests/fixtures/serverEnv/.env:
--------------------------------------------------------------------------------
1 | USER_NAME=root
2 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/builder/fixtures/icons/favicon.svg:
--------------------------------------------------------------------------------
1 | 123
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/builder/fixtures/icons/icon.png:
--------------------------------------------------------------------------------
1 | 123
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/builder/fixtures/icons/icon.svg:
--------------------------------------------------------------------------------
1 | 111
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/tests/fixtures/buildWatch/src/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/runtime-utils/tests/fixtures/fileReader/.gitignore:
--------------------------------------------------------------------------------
1 | *.tmp
--------------------------------------------------------------------------------
/tests/e2e/builder/.gitignore:
--------------------------------------------------------------------------------
1 | dist
2 | dist-*
3 | test-results
4 |
5 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/html/app-icon/src/index.js:
--------------------------------------------------------------------------------
1 | console.log('1');
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/html/favicon/src/index.js:
--------------------------------------------------------------------------------
1 | console.log('1');
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/web-worker/src/index.js:
--------------------------------------------------------------------------------
1 | console.log('1');
2 |
--------------------------------------------------------------------------------
/tests/integration/basic-app/.env.local:
--------------------------------------------------------------------------------
1 | MODERN_LOCAL_VAR=local_value
2 |
--------------------------------------------------------------------------------
/tests/integration/bff-corss-project/bff-api-app/.gitignore:
--------------------------------------------------------------------------------
1 | dist-1/
2 |
--------------------------------------------------------------------------------
/packages/cli/builder/compiled/postcss-load-config/index.d.ts:
--------------------------------------------------------------------------------
1 | export = any;
2 |
--------------------------------------------------------------------------------
/packages/cli/plugin-bff/cli.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/cjs/cli');
2 |
--------------------------------------------------------------------------------
/packages/cli/plugin-ssg/src/global.d.ts:
--------------------------------------------------------------------------------
1 | declare module 'normalize-path';
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/output-asset-prefix-extend.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/output-asset-prefix-extend.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/static/modern-run-window-fn.js:
--------------------------------------------------------------------------------
1 | runWindowFn();
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/layout.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/$.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/render/env.d.ts:
--------------------------------------------------------------------------------
1 | /// ;
2 |
--------------------------------------------------------------------------------
/packages/runtime/render/src/server/rsc/index.ts:
--------------------------------------------------------------------------------
1 | export * from './rsc';
2 |
--------------------------------------------------------------------------------
/packages/runtime/render/src/server/ssr/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ssr';
2 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/.babelrc:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/example-file.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/package.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/text.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/tests/fixtures/getFinalOption/sourceDir/bar.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/tests/fixtures/getFinalOption/watchDir/far.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/tests/fixtures/getFinalOption/watchDir/foo.jsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/html/cross-origin/src/index.js:
--------------------------------------------------------------------------------
1 | console.log('1');
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/html/script-loading/src/index.js:
--------------------------------------------------------------------------------
1 | console.log('1');
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/output/assets-retry/src/index.js:
--------------------------------------------------------------------------------
1 | console.log('1');
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/output/externals/src/aaa.js:
--------------------------------------------------------------------------------
1 | export const a = 2;
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/output/externals/src/ex.js:
--------------------------------------------------------------------------------
1 | window.aa = { a: 1 };
2 |
--------------------------------------------------------------------------------
/tests/integration/copy-assets/src/entry.ts:
--------------------------------------------------------------------------------
1 | console.log('hello world!');
2 |
--------------------------------------------------------------------------------
/tests/integration/server-monitors/README.md:
--------------------------------------------------------------------------------
1 | ## 用例说明
2 |
3 | * monitors 用例
4 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/convention-routing-motivation.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/convention-routing-motivation.mdx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-image/src/types.ts:
--------------------------------------------------------------------------------
1 | import '@rsbuild-image/core/types';
2 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/router/index.ts:
--------------------------------------------------------------------------------
1 | export * from './runtime';
2 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/layout.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/page.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './wrap';
2 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/constants.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/es6module.es6:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/nodemodule.mjs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/rn/index.ios.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/bff-core/src/client/index.ts:
--------------------------------------------------------------------------------
1 | export * from './generateClient';
2 |
--------------------------------------------------------------------------------
/packages/server/create-request/env.d.ts:
--------------------------------------------------------------------------------
1 | /// ;
2 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/default-export/no-export.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/fixtures/utils/modern.server-runtime.config.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/tests/fixtures/build/src/error:
--------------------------------------------------------------------------------
1 | conts a = 1;
2 |
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/tests/fixtures/build/src/error1:
--------------------------------------------------------------------------------
1 | conts a = 1;
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/basic/src/common/test.js:
--------------------------------------------------------------------------------
1 | export const test = 1;
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/web-worker/src/test.js:
--------------------------------------------------------------------------------
1 | export const bb = 'hello world';
2 |
--------------------------------------------------------------------------------
/packages/cli/plugin-bff/server.js:
--------------------------------------------------------------------------------
1 | module.exports = require('./dist/cjs/server');
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/ssr-monitor.mdx:
--------------------------------------------------------------------------------
1 | :::note
2 | 敬请期待
3 | :::
--------------------------------------------------------------------------------
/packages/generator/generator-common/src/base/index.ts:
--------------------------------------------------------------------------------
1 | export * from './project';
2 |
--------------------------------------------------------------------------------
/packages/generator/generator-common/src/expand/index.ts:
--------------------------------------------------------------------------------
1 | export * from './generator';
2 |
--------------------------------------------------------------------------------
/packages/generator/generators/base-generator/templates/base-template/.nvmrc:
--------------------------------------------------------------------------------
1 | lts/jod
2 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/static/modern-run-router-data-fn.js:
--------------------------------------------------------------------------------
1 | runRouterDataFn();
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/__auth/layout.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/layout.loader.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/$.config.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/[id]/page.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/page.loader.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/actions/something.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/components/App.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/components/Root.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/components/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/constants/actions.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/rn/index.android.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/entries/no-entry/src/common/util.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/entries/single-entry/src/App.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/html-templates/no-config/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/server-routes/no-config/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/fixtures/subcommand/config.ts:
--------------------------------------------------------------------------------
1 | export default {};
2 |
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/tests/fixtures/buildWatch/src/error:
--------------------------------------------------------------------------------
1 | conts a = 1;
2 |
--------------------------------------------------------------------------------
/packages/toolkit/runtime-utils/src/server/index.ts:
--------------------------------------------------------------------------------
1 | export * from './nestedRoutes';
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/tests/fixtures/compat-require/empty.js:
--------------------------------------------------------------------------------
1 | module.exports = null;
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/module-scopes/common/test.js:
--------------------------------------------------------------------------------
1 | export const test = 1;
2 |
--------------------------------------------------------------------------------
/tests/integration/alias-set/src/alias/index.ts:
--------------------------------------------------------------------------------
1 | console.log('resolve-alias success');
2 |
--------------------------------------------------------------------------------
/tests/integration/routes-match/src/a/App.tsx:
--------------------------------------------------------------------------------
1 | export default () =>
AAA
;
2 |
--------------------------------------------------------------------------------
/tests/integration/routes-match/src/b/App.tsx:
--------------------------------------------------------------------------------
1 | export default () => BBB
;
2 |
--------------------------------------------------------------------------------
/tests/integration/routes-match/src/c/App.tsx:
--------------------------------------------------------------------------------
1 | export default () => CCC
;
2 |
--------------------------------------------------------------------------------
/packages/cli/flight-server-transform-plugin/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | ^target/
3 | target
4 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/ssr-monitor.mdx:
--------------------------------------------------------------------------------
1 | :::note
2 | Coming soon
3 | :::
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/.gitignore:
--------------------------------------------------------------------------------
1 | tests/document/feature/document/_main.html.js
2 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/__auth/__shop/layout.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/__auth/layout.loader.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/__auth/login/page.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/$.data.client.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/[id]/page.data.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/layout.loader.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/profile/layout.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/profile/page.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/components/Header/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/libs/custom.modernizr3.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/core/tests/fixtures/mock/zero/config/mock/index.ts:
--------------------------------------------------------------------------------
1 | export default {};
2 |
--------------------------------------------------------------------------------
/packages/server/core/tests/fixtures/serverEnv/.env.prod:
--------------------------------------------------------------------------------
1 | USER_NAME=prod_root
2 | ENV=prod
3 |
--------------------------------------------------------------------------------
/packages/server/core/tests/fixtures/serverEnv/.env.test:
--------------------------------------------------------------------------------
1 | USER_NAME=test_root
2 | ENV=test
3 |
--------------------------------------------------------------------------------
/packages/server/server/tests/fixtures/mock/zero/config/mock/index.ts:
--------------------------------------------------------------------------------
1 | export default {};
2 |
--------------------------------------------------------------------------------
/packages/server/server/tests/fixtures/watch/a.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | name: 'a',
3 | };
4 |
--------------------------------------------------------------------------------
/packages/server/server/tests/helper.ts:
--------------------------------------------------------------------------------
1 | export const noop = () => {
2 | // empty
3 | };
4 |
--------------------------------------------------------------------------------
/packages/server/utils/tests/fixtures/es-example/src/index.js:
--------------------------------------------------------------------------------
1 | export const foo = 'foo';
2 |
--------------------------------------------------------------------------------
/packages/server/utils/tests/fixtures/ts-example/src/index.ts:
--------------------------------------------------------------------------------
1 | export const foo = 'foo';
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/src/universal/index.ts:
--------------------------------------------------------------------------------
1 | export { cutNameByHyphen } from './path';
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/dev/hmr/src/App.css:
--------------------------------------------------------------------------------
1 | #test {
2 | color: rgb(255, 0, 0);
3 | }
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/html-tags/src/foo.ts:
--------------------------------------------------------------------------------
1 | export enum Animals {
2 | Fish = 0,
3 | }
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/postcss/postcss-config-file/src/index.css:
--------------------------------------------------------------------------------
1 | @tailwind utilities;
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/postcss/postcss-config-file/src/index.ts:
--------------------------------------------------------------------------------
1 | import './index.css';
2 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/user/utils.server.ts:
--------------------------------------------------------------------------------
1 | export * from 'fs-extra';
2 |
--------------------------------------------------------------------------------
/tests/integration/server-prod/config/public/MP_verify_abcdef.txt:
--------------------------------------------------------------------------------
1 | MP_verify_abcdef.txt
2 |
--------------------------------------------------------------------------------
/packages/cli/plugin-ssg/src/server/consts.ts:
--------------------------------------------------------------------------------
1 | export const CLOSE_SIGN = 'modern_close_server';
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/concept/_meta.json:
--------------------------------------------------------------------------------
1 | ["entries", "builder", "server"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/concept/_meta.json:
--------------------------------------------------------------------------------
1 | ["entries", "builder", "server"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/plugin/server-plugins/api.mdx:
--------------------------------------------------------------------------------
1 | # 插件 API
2 |
3 | 敬请期待...
4 |
--------------------------------------------------------------------------------
/packages/generator/new-action/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './utils';
2 | export * from './mwa';
3 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/__auth/__shop/item/page.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user.profile.name/layout.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user.profile.name/page.tsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/profile/page.loader.ts:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/components/Header/SubHeader.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/components/Header/header.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/server-runtime/src/cache.ts:
--------------------------------------------------------------------------------
1 | export * from '@modern-js/runtime-utils/cache';
2 |
--------------------------------------------------------------------------------
/packages/server/utils/src/type.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@modern-js/babel-plugin-module-resolver';
2 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/server-routes/has-config/config/public/wx.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/tests/fixtures/compat-require/cjs.js:
--------------------------------------------------------------------------------
1 | module.exports = { name: 'cjs' };
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/html/inject-false/src/index.css:
--------------------------------------------------------------------------------
1 | .test {
2 | font-size: 14px;
3 | }
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/polyfill/src/index.js:
--------------------------------------------------------------------------------
1 | window.a = [1, 2, 3, 4, [5, 6, [7, 8]]].flat();
2 |
--------------------------------------------------------------------------------
/tests/integration/basic-app/.env:
--------------------------------------------------------------------------------
1 | MODERN_TEST_VAR=modern_default_value
2 | NODE_ENV=development
3 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/user/page.module.css:
--------------------------------------------------------------------------------
1 | .page {
2 | color: red;
3 | }
4 |
--------------------------------------------------------------------------------
/tests/integration/source-code-build/components/src/index.tsx:
--------------------------------------------------------------------------------
1 | export * from '@/card/index';
2 |
--------------------------------------------------------------------------------
/packages/cli/plugin-bff/tests/fixtures/testFetcher.ts:
--------------------------------------------------------------------------------
1 | console.info('');
2 |
3 | export type {};
4 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/plugin/cli-plugins/_meta.json:
--------------------------------------------------------------------------------
1 | ["api", "life-cycle", "migration"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/plugin/cli-plugins/_meta.json:
--------------------------------------------------------------------------------
1 | ["api", "life-cycle", "migration"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/plugin/server-plugins/life-cycle.mdx:
--------------------------------------------------------------------------------
1 | # 生命周期
2 |
3 | 敬请期待...
4 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/cache/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@modern-js/runtime-utils/cache';
2 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/components/Sidebar/Footer/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/server/core/tests/fixtures/load-plugins/test-a/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test-a"
3 | }
4 |
--------------------------------------------------------------------------------
/packages/server/core/tests/fixtures/mock/module-error/config/mock/index.ts:
--------------------------------------------------------------------------------
1 | export default null;
2 |
--------------------------------------------------------------------------------
/packages/server/core/tests/fixtures/render/ssr/user.html:
--------------------------------------------------------------------------------
1 |
2 | User
3 |
4 |
--------------------------------------------------------------------------------
/packages/server/server/tests/fixtures/mock/module-error/config/mock/index.ts:
--------------------------------------------------------------------------------
1 | export default null;
2 |
--------------------------------------------------------------------------------
/packages/server/utils/tests/fixtures/es-example/shared/index.js:
--------------------------------------------------------------------------------
1 | export const shared = 'shared';
2 |
--------------------------------------------------------------------------------
/packages/server/utils/tests/fixtures/ts-example/shared/index.ts:
--------------------------------------------------------------------------------
1 | export const shared = 'shared';
2 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/html-templates/custom-index/config/html/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/html-templates/custom-partial/config/html/body.ejs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/server-routes/has-config/config/public/b/info.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/tests/fixture/test-package-esm/index.js:
--------------------------------------------------------------------------------
1 | export const bar = 1;
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/src/cli/logger.ts:
--------------------------------------------------------------------------------
1 | export { logger, createLogger, type Logger } from 'rslog';
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/performance/load-resource/src/test.css:
--------------------------------------------------------------------------------
1 | .test {
2 | width: 10px;
3 | }
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/postcss/postcss-function-options/src/bar/index.css:
--------------------------------------------------------------------------------
1 | @tailwind utilities;
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/postcss/postcss-function-options/src/bar/index.ts:
--------------------------------------------------------------------------------
1 | import './index.css';
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/postcss/postcss-function-options/src/foo/index.css:
--------------------------------------------------------------------------------
1 | @tailwind utilities;
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/postcss/postcss-function-options/src/foo/index.ts:
--------------------------------------------------------------------------------
1 | import './index.css';
2 |
--------------------------------------------------------------------------------
/tests/integration/alias-set/src/common/constants.ts:
--------------------------------------------------------------------------------
1 | const test = 1;
2 |
3 | export default test;
4 |
--------------------------------------------------------------------------------
/tests/integration/asset-prefix/src/entry.ts:
--------------------------------------------------------------------------------
1 | console.log('hello world!', process.env.ASSET_PREFIX);
2 |
--------------------------------------------------------------------------------
/tests/integration/load-config/fixtures/basic-local-config/src/entry.ts:
--------------------------------------------------------------------------------
1 | console.log('hello world!');
2 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/user/profile/utils.server.ts:
--------------------------------------------------------------------------------
1 | export * from 'fs-extra';
2 |
--------------------------------------------------------------------------------
/assets/modernjs-banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/assets/modernjs-banner.png
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/plugin/runtime-plugins/_meta.json:
--------------------------------------------------------------------------------
1 | ["api", "life-cycle", "migration"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/plugin/server-plugins/api.mdx:
--------------------------------------------------------------------------------
1 | # Plugin API
2 |
3 | Comming soon...
4 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/plugin/runtime-plugins/_meta.json:
--------------------------------------------------------------------------------
1 | ["api", "life-cycle", "migration"]
2 |
--------------------------------------------------------------------------------
/packages/server/core/tests/fixtures/render/csr/index.html:
--------------------------------------------------------------------------------
1 |
2 | Hello Modern
3 |
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/server-routes/has-config/config/public/b/about/logo.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/server-routes/has-config/config/public/test.json:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/packages/toolkit/types/server/bff.d.ts:
--------------------------------------------------------------------------------
1 | export type HttpMethodDecider = 'functionName' | 'inputParams';
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/tests/fixtures/compat-require/foo.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: 'foo',
3 | };
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/html/inject-false/src/index.js:
--------------------------------------------------------------------------------
1 | import './index.css';
2 |
3 | console.log('1');
4 |
--------------------------------------------------------------------------------
/tests/integration/load-config/fixtures/async-config-function/src/entry.ts:
--------------------------------------------------------------------------------
1 | console.log('hello world!');
2 |
--------------------------------------------------------------------------------
/tests/integration/load-config/fixtures/config-function-params/src/entry.ts:
--------------------------------------------------------------------------------
1 | console.log('hello world!');
2 |
--------------------------------------------------------------------------------
/tests/integration/load-config/fixtures/local-config-function/src/entry.ts:
--------------------------------------------------------------------------------
1 | console.log('hello world!');
2 |
--------------------------------------------------------------------------------
/tests/integration/source-code-build/common/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export type Plugin = Record;
2 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/streaming/src/routes/about/about.css:
--------------------------------------------------------------------------------
1 | .about {
2 | color: blue;
3 | }
4 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "trailingComma": "all",
4 | "arrowParens": "avoid"
5 | }
6 |
--------------------------------------------------------------------------------
/packages/cli/plugin-bff/tests/fixtures/requestCreator/client.ts:
--------------------------------------------------------------------------------
1 | console.info('');
2 |
3 | export type {};
4 |
--------------------------------------------------------------------------------
/packages/cli/plugin-bff/tests/fixtures/requestCreator/server.ts:
--------------------------------------------------------------------------------
1 | console.info('');
2 |
3 | export type {};
4 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/plugin/server-plugins/life-cycle.mdx:
--------------------------------------------------------------------------------
1 | # Life Cycle
2 |
3 | Comming soon...
4 |
--------------------------------------------------------------------------------
/packages/generator/generator-common/src/mwa/index.ts:
--------------------------------------------------------------------------------
1 | export * from './entry';
2 | export * from './project';
3 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/router/runtime/server.ts:
--------------------------------------------------------------------------------
1 | export * from '@modern-js/runtime-utils/router';
2 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/test/tools.js:
--------------------------------------------------------------------------------
1 | export default function x() {}
2 |
--------------------------------------------------------------------------------
/packages/server/prod-server/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/packages/server/utils/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './compilers/babel';
2 | export { compile } from './common';
3 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/src/config/index.ts:
--------------------------------------------------------------------------------
1 | export * from './initialize';
2 | export * from './default';
3 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/html-templates/custom-index/config/html/page-a/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/html-templates/custom-partial/config/html/page-a/head.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/html-templates/custom-partial/config/html/page-a/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/html-templates/custom-partial/config/html/page-b/body.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/html-templates/custom-partial/config/html/page-b/top.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/tests/fixtures/utils/far:
--------------------------------------------------------------------------------
1 | const far = 1;
2 | //# sourceMappingURL=far.js.map
3 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/tests/fixture/test-package-esm-with-cjs/index.mjs:
--------------------------------------------------------------------------------
1 | export const bar = 1;
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/node-addons/src/index.js:
--------------------------------------------------------------------------------
1 | import node from './a.node';
2 |
3 | console.log(node);
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/global-vars/src/types.d.ts:
--------------------------------------------------------------------------------
1 | declare const ENABLE_TEST: boolean | undefined;
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/plugin-import/foo/lib/foo.js:
--------------------------------------------------------------------------------
1 | export default 'transformImport test succeed';
2 |
--------------------------------------------------------------------------------
/tests/integration/app-document/src/test/App.tsx:
--------------------------------------------------------------------------------
1 | export default function A() {
2 | return A
;
3 | }
4 |
--------------------------------------------------------------------------------
/tests/integration/async-entry/src/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => hello
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/integration/bff-corss-project/bff-api-app/shared/index.ts:
--------------------------------------------------------------------------------
1 | export const COMMON_PREFIX = '/common-api';
2 |
--------------------------------------------------------------------------------
/tests/integration/deploy-csr/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/tests/integration/disable-html/src/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => hello
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/integration/pure-esm-project/api/index.js:
--------------------------------------------------------------------------------
1 | export const hello = () => {
2 | return 'hello';
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/common/utils.ts:
--------------------------------------------------------------------------------
1 | export const modernTestActionName = 'modern_test_action_name';
2 |
--------------------------------------------------------------------------------
/tests/integration/server-config/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/streaming-inline/src/routes/about/about.css:
--------------------------------------------------------------------------------
1 | .about {
2 | color: blue;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/troubleshooting/_meta.json:
--------------------------------------------------------------------------------
1 | ["dependencies", "cli", "builder", "hmr"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/troubleshooting/_meta.json:
--------------------------------------------------------------------------------
1 | ["dependencies", "cli", "builder", "hmr"]
2 |
--------------------------------------------------------------------------------
/packages/generator/generator-common/src/newAction/index.ts:
--------------------------------------------------------------------------------
1 | export * from './common';
2 | export * from './mwa';
3 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/router/runtime/rsc.tsx:
--------------------------------------------------------------------------------
1 | export * from '@modern-js/runtime-utils/router/rsc';
2 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/tests/testproject/src/components/Sidebar/Footer/SidebarFooterButton.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/tests/fixtures/resolveSourceMap/src/index.js:
--------------------------------------------------------------------------------
1 | const a = 1;
2 | console.info(a);
3 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/tests/fixture/test-package-esm-with-cjs/index.cjs:
--------------------------------------------------------------------------------
1 | module.exports.bar = 1;
2 |
--------------------------------------------------------------------------------
/packages/toolkit/runtime-utils/tests/fixtures/fileReader/index.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | name: 'modern',
3 | };
4 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/mime-types/package.json:
--------------------------------------------------------------------------------
1 | {"name":"mime-types","version":"2.1.35","license":"MIT"}
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/inline-chunk/src/style.css:
--------------------------------------------------------------------------------
1 | html,
2 | body {
3 | width: 100%;
4 | height: 100%;
5 | }
6 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/plugin-import/foo/lib/camelCase.js:
--------------------------------------------------------------------------------
1 | export default 'transformImport test succeed';
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/plugin-import/foo/lib/kabab-case.js:
--------------------------------------------------------------------------------
1 | export default 'transformImport test succeed';
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/plugin-import/foo/lib/named.js:
--------------------------------------------------------------------------------
1 | export const named = 'transformImport test succeed'
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/plugin-import/src/index.js:
--------------------------------------------------------------------------------
1 | import { foo } from 'foo';
2 |
3 | console.log(foo);
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/source-exclude/src/index.js:
--------------------------------------------------------------------------------
1 | import { printLog } from './test';
2 |
3 | printLog();
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/tsconfig-paths/src/common/test.ts:
--------------------------------------------------------------------------------
1 | export const content = 'tsconfig paths worked';
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/tsconfig-paths/src/common2/test.ts:
--------------------------------------------------------------------------------
1 | export const content = 'source.alias worked';
2 |
--------------------------------------------------------------------------------
/tests/integration/basic-app/.env.development:
--------------------------------------------------------------------------------
1 | MODERN_TEST_VAR=modern_dev_value
2 | MODERN_DEV_ONLY=dev_only_value
3 |
--------------------------------------------------------------------------------
/tests/integration/clean-dist-path/src/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => hello
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/integration/custom-dist-path/src/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => hello
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/integration/custom-template/src/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => hello
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/integration/nonce/src/routes/page.tsx:
--------------------------------------------------------------------------------
1 | export default () => {
2 | return Hello Modern.js
;
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/four/routes/$.tsx:
--------------------------------------------------------------------------------
1 | export default () => {
2 | return catch all
;
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/layout.config.ts:
--------------------------------------------------------------------------------
1 | export const handle = {
2 | crumbs: 'root',
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/base-async-entry/src/routes/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | background-color: #f0f0f0;
3 | }
4 |
--------------------------------------------------------------------------------
/tests/jest-puppeteer.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | launch: {
3 | args: ['--no-sandbox'],
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/advanced-features/server-monitor/_meta.json:
--------------------------------------------------------------------------------
1 | ["monitors", "logger", "metrics"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/basic-features/data/_meta.json:
--------------------------------------------------------------------------------
1 | ["data-fetch", "data-write", "data-cache"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/basic-features/testing/_meta.json:
--------------------------------------------------------------------------------
1 | ["playwright", "vitest", "jest", "cypress"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/advanced-features/server-monitor/_meta.json:
--------------------------------------------------------------------------------
1 | ["monitors", "logger", "metrics"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/basic-features/data/_meta.json:
--------------------------------------------------------------------------------
1 | ["data-fetch", "data-write", "data-cache"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/basic-features/testing/_meta.json:
--------------------------------------------------------------------------------
1 | ["playwright", "vitest", "jest", "cypress"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | pageType: home
3 | ---
4 | # Modern.js - 基于 React 的渐进式 Web 开发框架
5 |
--------------------------------------------------------------------------------
/packages/generator/generators/base-generator/templates/pnpm-template/npmrc.handlebars:
--------------------------------------------------------------------------------
1 | strict-peer-dependencies=false
2 |
--------------------------------------------------------------------------------
/packages/generator/sandpack-react/scripts/codesandbox/.codesandbox/environment.json:
--------------------------------------------------------------------------------
1 | {
2 | "nodeVersion": 18
3 | }
4 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/document/feature/document/_tempTsconfig.json:
--------------------------------------------------------------------------------
1 | {"compilerOptions":{"jsx":"react-jsx"}}
--------------------------------------------------------------------------------
/packages/server/server/tests/fixtures/watch/index.ts:
--------------------------------------------------------------------------------
1 | import a from './a';
2 |
3 | export default {
4 | a,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/routes/fixtures/router-plugin2/index.js:
--------------------------------------------------------------------------------
1 | import foo from './foo';
2 |
3 | foo();
4 |
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/tests/fixtures/compiler/src/index.js:
--------------------------------------------------------------------------------
1 | const a = 1;
2 | console.info('this is test', a);
3 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/tests/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/packages/toolkit/runtime-utils/src/browser/index.ts:
--------------------------------------------------------------------------------
1 | export * from './nestedRoutes';
2 | export * from './deferreds';
3 |
--------------------------------------------------------------------------------
/packages/toolkit/types/index.d.ts:
--------------------------------------------------------------------------------
1 | export * from './server';
2 | export * from './cli';
3 | export * from './common';
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/plugin-import/src/named.js:
--------------------------------------------------------------------------------
1 | import { named } from 'foo';
2 |
3 | console.log(named);
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/source-include/src/index.js:
--------------------------------------------------------------------------------
1 | import { printLog } from '../../test';
2 |
3 | printLog();
4 |
--------------------------------------------------------------------------------
/tests/integration/app-document/src/sub/routes/a/a.less:
--------------------------------------------------------------------------------
1 | .a {
2 | h1 {
3 | color: green !important;
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/page.tsx:
--------------------------------------------------------------------------------
1 | export default function Page() {
2 | return Page
;
3 | }
4 |
--------------------------------------------------------------------------------
/.changeset/silly-carpets-mix.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/server': patch
3 | ---
4 |
5 | fix: update treeNode
6 | fix: 修复依赖更新问题
7 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | registry = 'https://registry.npmjs.org/'
2 |
3 | link-workspace-packages=false
4 | strict-peer-dependencies=false
5 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/apis/app/hooks/config/_meta.json:
--------------------------------------------------------------------------------
1 | ["html", "favicon", "icon", "mock", "public", "upload"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/basic-features/css/_meta.json:
--------------------------------------------------------------------------------
1 | ["css", "css-modules", "css-in-js", "tailwindcss"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/basic-features/debug/_meta.json:
--------------------------------------------------------------------------------
1 | ["mock", "proxy", "rsdoctor", "using-storybook"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/plugin/official/cli-plugins/_meta.json:
--------------------------------------------------------------------------------
1 | ["plugin-tailwind", "plugin-bff", "plugin-ssg"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/apis/app/hooks/config/_meta.json:
--------------------------------------------------------------------------------
1 | ["html", "favicon", "icon", "mock", "public", "upload"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/default-mwa-generate.mdx:
--------------------------------------------------------------------------------
1 | ```bash
2 | ? 请选择开发语言:TS
3 | ? 请选择包管理工具:pnpm
4 | ```
5 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/deploy.mdx:
--------------------------------------------------------------------------------
1 | 本地验证完成后,可以参考 [部署](/guides/basic-features/deploy.html) 一节,将项目部署到服务器上。
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/basic-features/css/_meta.json:
--------------------------------------------------------------------------------
1 | ["css", "css-modules", "css-in-js", "tailwindcss"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/basic-features/debug/_meta.json:
--------------------------------------------------------------------------------
1 | ["mock", "proxy", "rsdoctor", "using-storybook"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/plugin/official/cli-plugins/_meta.json:
--------------------------------------------------------------------------------
1 | ["plugin-tailwind", "plugin-bff", "plugin-ssg"]
2 |
--------------------------------------------------------------------------------
/packages/generator/generators/packages-generator/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/packages/generator/sandpack-react/.gitignore:
--------------------------------------------------------------------------------
1 | src/templates/common.ts
2 | src/templates/mwa.ts
3 | src/templates/module.ts
4 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/router/cli/code/getClientRoutes/index.ts:
--------------------------------------------------------------------------------
1 | export { getClientRoutes } from './getRoutes';
2 |
--------------------------------------------------------------------------------
/packages/server/core/tests/fixtures/load-plugins/test-a/index.js:
--------------------------------------------------------------------------------
1 | module.exports = () => ({
2 | name: 'test-a',
3 | });
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/routes/fixtures/router-plugin1/index.js:
--------------------------------------------------------------------------------
1 | import foo from './routes/foo';
2 |
3 | foo();
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/routes/fixtures/router-plugin3/index.js:
--------------------------------------------------------------------------------
1 | import foo from './routes/foo';
2 |
3 | foo();
4 |
--------------------------------------------------------------------------------
/packages/toolkit/types/modern.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('@modern-js/module-tools').UserConfig} */
2 | module.exports = {};
3 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './compiled';
2 | export * from './cli';
3 | export * from './import';
4 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/tests/fixtures/plugin/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "plugin-a": "*"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/check-syntax/fixtures/basic/src/index.js:
--------------------------------------------------------------------------------
1 | import { printLog } from './test';
2 |
3 | printLog();
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/check-syntax/fixtures/esnext/src/index.js:
--------------------------------------------------------------------------------
1 | import { printLog } from './test';
2 |
3 | printLog();
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/inline-chunk/src/foo.js:
--------------------------------------------------------------------------------
1 | export function foo() {
2 | console.log('foo');
3 | return 'foo';
4 | }
5 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/plugin-import/src/camel.js:
--------------------------------------------------------------------------------
1 | import { camelCase } from 'foo';
2 |
3 | console.log(camelCase);
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/plugin-import/src/kebab.js:
--------------------------------------------------------------------------------
1 | import { kababCase } from 'foo';
2 |
3 | console.log(kababCase);
4 |
--------------------------------------------------------------------------------
/tests/integration/basic-app/.browserslistrc:
--------------------------------------------------------------------------------
1 | chrome >= 51
2 | edge >= 15
3 | firefox >= 54
4 | safari >= 10
5 | ios_saf >= 10
6 |
--------------------------------------------------------------------------------
/tests/integration/source-code-build/common/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './types';
2 |
3 | export const VERSION = '1.0.0';
4 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/basic-features/static-assets/_meta.json:
--------------------------------------------------------------------------------
1 | ["json-files", "svg-assets", "wasm-assets"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/turtorials-example-list.mdx:
--------------------------------------------------------------------------------
1 | - [路由鉴权](/tutorials/examples/csr-auth.html)
2 | - ...
3 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/basic-features/static-assets/_meta.json:
--------------------------------------------------------------------------------
1 | ["json-files", "svg-assets", "wasm-assets"]
2 |
--------------------------------------------------------------------------------
/packages/generator/new-action/tests/fixtures/mwa.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "@modern-js/app-tools": "2"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/server/core/tests/fixtures/mock/type-error/config/mock/index.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'GET /api/getInfo': 'foo',
3 | };
4 |
--------------------------------------------------------------------------------
/packages/server/server/tests/fixtures/pure/modern.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | server: {
3 | ssr: true,
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/packages/server/utils/tests/fixtures/es-example/api/map-alias.js:
--------------------------------------------------------------------------------
1 | import runtime from '@modern-js/runtime';
2 |
3 | runtime();
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/default-export/arrow-function.ts:
--------------------------------------------------------------------------------
1 | export default () => {
2 | // empty
3 | };
4 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/tests/fixture/input.ts:
--------------------------------------------------------------------------------
1 | import * as a from './a';
2 |
3 | export default {
4 | a,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/toolkit/runtime-utils/src/rsc.ts:
--------------------------------------------------------------------------------
1 | // Here import the server APIs for the react-router
2 | export * from 'react-router';
3 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/semver/package.json:
--------------------------------------------------------------------------------
1 | {"name":"semver","author":"GitHub Inc.","version":"7.6.0","license":"ISC"}
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/tests/fixtures/browserlist/dotfile/.browserslistrc:
--------------------------------------------------------------------------------
1 | defaults
2 | not IE 11
3 | maintained node versions
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/dev/basic/src/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => Hello Builder!
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/html-tags/src/index.ts:
--------------------------------------------------------------------------------
1 | import { Animals } from './foo';
2 |
3 | console.log('fish is :', Animals.Fish);
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/playwright.config.ts:
--------------------------------------------------------------------------------
1 | import { defineConfig } from '@playwright/test';
2 |
3 | export default defineConfig({});
4 |
--------------------------------------------------------------------------------
/tests/integration/deploy-csr/src/one/routes/page.data.ts:
--------------------------------------------------------------------------------
1 | export const loader = () => {
2 | return 'Hello Modern.js';
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/deploy-csr/src/two/routes/page.data.ts:
--------------------------------------------------------------------------------
1 | export const loader = () => {
2 | return 'Hello Modern.js';
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/deploy-server/src/one/routes/page.data.ts:
--------------------------------------------------------------------------------
1 | export const loader = () => {
2 | return 'Hello Modern.js';
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/deploy-server/src/two/routes/page.data.ts:
--------------------------------------------------------------------------------
1 | export const loader = () => {
2 | return 'Hello Modern.js';
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/rsc-csr-app/.browserslistrc:
--------------------------------------------------------------------------------
1 | chrome >= 51
2 | edge >= 15
3 | firefox >= 54
4 | safari >= 10
5 | ios_saf >= 10
6 |
--------------------------------------------------------------------------------
/tests/integration/rsc-csr-routes/.browserslistrc:
--------------------------------------------------------------------------------
1 | chrome >= 51
2 | edge >= 15
3 | firefox >= 54
4 | safari >= 10
5 | ios_saf >= 10
6 |
--------------------------------------------------------------------------------
/tests/integration/rsc-ssr-app/.browserslistrc:
--------------------------------------------------------------------------------
1 | chrome >= 51
2 | edge >= 15
3 | firefox >= 54
4 | safari >= 10
5 | ios_saf >= 10
6 |
--------------------------------------------------------------------------------
/tests/integration/rsc-ssr-routes/.browserslistrc:
--------------------------------------------------------------------------------
1 | chrome >= 51
2 | edge >= 15
3 | firefox >= 54
4 | safari >= 10
5 | ios_saf >= 10
6 |
--------------------------------------------------------------------------------
/tests/integration/source-code-build/utils/src/common/index.ts:
--------------------------------------------------------------------------------
1 | export * from './toUpperCase';
2 | export * from './toLowerCase';
3 |
--------------------------------------------------------------------------------
/tests/integration/source-code-build/utils/src/common/toLowerCase.ts:
--------------------------------------------------------------------------------
1 | export const toLowerCase = (s: string) => s.toLowerCase();
2 |
--------------------------------------------------------------------------------
/tests/integration/source-code-build/utils/src/common/toUpperCase.ts:
--------------------------------------------------------------------------------
1 | export const toUpperCase = (s: string) => s.toUpperCase();
2 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/partial/src/one/routes/page.tsx:
--------------------------------------------------------------------------------
1 | export default () => {
2 | return root page
;
3 | };
4 |
--------------------------------------------------------------------------------
/packages/cli/plugin-bff/types.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@modern-js/runtime/bff' {
2 | export * from '@modern-js/create-request';
3 | }
4 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/community/blog/_meta.json:
--------------------------------------------------------------------------------
1 | ["overview", "v2-release-note", "2022-0910-updates", "2022-0708-updates"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/get-started/_meta.json:
--------------------------------------------------------------------------------
1 | ["introduction", "quick-start", "upgrade", "glossary", "tech-stack"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/community/blog/_meta.json:
--------------------------------------------------------------------------------
1 | ["overview", "v2-release-note", "2022-0910-updates", "2022-0708-updates"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/get-started/_meta.json:
--------------------------------------------------------------------------------
1 | ["introduction", "quick-start", "upgrade", "glossary", "tech-stack"]
2 |
--------------------------------------------------------------------------------
/packages/generator/generators/bff-generator/src/locale/zh.ts:
--------------------------------------------------------------------------------
1 | export const ZH_LOCALE = {
2 | success: `安装插件依赖成功!请添加如下代码至`,
3 | };
4 |
--------------------------------------------------------------------------------
/packages/generator/generators/ssg-generator/src/locale/zh.ts:
--------------------------------------------------------------------------------
1 | export const ZH_LOCALE = {
2 | success: `安装插件依赖成功!请添加如下代码至`,
3 | };
4 |
--------------------------------------------------------------------------------
/packages/server/server/tests/fixtures/mock/type-error/config/mock/index.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | 'GET /api/getInfo': 'foo',
3 | };
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/default-export/function.ts:
--------------------------------------------------------------------------------
1 | export default function (_App) {
2 | // empty
3 | }
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/fixtures/subcommand/mockPlugin.ts:
--------------------------------------------------------------------------------
1 | /** empty file for mock plugin(need a file path that is real) */
2 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/tests/fixture/test-package-ts/index.ts:
--------------------------------------------------------------------------------
1 | type Bar = number;
2 |
3 | export const bar: Bar = 1;
4 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/src/universal/path.ts:
--------------------------------------------------------------------------------
1 | export const cutNameByHyphen = (s: string) => {
2 | return s.split(/[-_]/)[0];
3 | };
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/html/mount-id/src/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => Hello Builder!
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/html/template/src/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => Hello Builder!
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/moment/src/index.js:
--------------------------------------------------------------------------------
1 | import moment from 'moment';
2 |
3 | moment([2007, 0, 28]).format('dddd, MMMM Do YYYY');
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/web-worker/.browserslistrc:
--------------------------------------------------------------------------------
1 | chrome >= 51
2 | edge >= 15
3 | firefox >= 54
4 | safari >= 10
5 | ios_saf >= 10
6 |
--------------------------------------------------------------------------------
/tests/integration/main-entry-name/.browserslistrc:
--------------------------------------------------------------------------------
1 | chrome >= 51
2 | edge >= 15
3 | firefox >= 54
4 | safari >= 10
5 | ios_saf >= 10
6 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/loading.tsx:
--------------------------------------------------------------------------------
1 | const loading = () => loading...
;
2 |
3 | export default loading;
4 |
--------------------------------------------------------------------------------
/tests/integration/server-config/src/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => {
2 | return hello
;
3 | };
4 |
5 | export default App;
6 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/fallback/src/routes/page.tsx:
--------------------------------------------------------------------------------
1 | export default function Layout() {
2 | return page
;
3 | }
4 |
--------------------------------------------------------------------------------
/.changeset/quick-taxis-beam.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/server-core': patch
3 | ---
4 |
5 | fix: proxy request
6 | fix: 修复 proxy request 问题
7 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/basic-features/render/_meta.json:
--------------------------------------------------------------------------------
1 | ["ssr", "streaming-ssr", "ssr-cache", "ssg", "before-render"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/topic-detail/module-federation/_meta.json:
--------------------------------------------------------------------------------
1 | ["introduce", "usage", "application", "ssr", "deploy"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/basic-features/render/_meta.json:
--------------------------------------------------------------------------------
1 | ["ssr", "streaming-ssr", "ssr-cache", "ssg", "before-render"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/topic-detail/module-federation/_meta.json:
--------------------------------------------------------------------------------
1 | ["introduce", "usage", "application", "ssr", "deploy"]
2 |
--------------------------------------------------------------------------------
/packages/generator/generators/dependence-generator/src/locale/zh.ts:
--------------------------------------------------------------------------------
1 | export const ZH_LOCALE = {
2 | success: `安装插件依赖成功!请添加如下代码至`,
3 | };
4 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-image/src/runtime.ts:
--------------------------------------------------------------------------------
1 | export * from '@rsbuild-image/core/shared';
2 | export { Image } from '@rsbuild-image/react';
3 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/layout.config.ts:
--------------------------------------------------------------------------------
1 | export const handle = {
2 | root: 'root',
3 | };
4 |
--------------------------------------------------------------------------------
/packages/server/utils/tests/fixtures/es-example/shared/runtime/server.js:
--------------------------------------------------------------------------------
1 | export const useContext = () => {
2 | return 'runtime';
3 | };
4 |
--------------------------------------------------------------------------------
/packages/server/utils/tests/fixtures/ts-example/shared/runtime/server.ts:
--------------------------------------------------------------------------------
1 | export const useContext = () => {
2 | return 'runtime';
3 | };
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/src/plugins/deploy/platforms/netlify-entry.mjs:
--------------------------------------------------------------------------------
1 | export { handler as default } from './netlify-handler.cjs';
2 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/default-export/no-default-export.js:
--------------------------------------------------------------------------------
1 | export const a = '1';
2 | export const b = '2';
3 |
--------------------------------------------------------------------------------
/packages/toolkit/plugin/src/runtime/run/index.ts:
--------------------------------------------------------------------------------
1 | import { createRuntime } from './create';
2 |
3 | export const runtime = createRuntime();
4 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/react-server-dom-webpack/client.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = require('./client.browser');
4 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/output/rem/src/App.module.less:
--------------------------------------------------------------------------------
1 | .title {
2 | text-align: center;
3 | color: blue;
4 | font-size: 20px;
5 | }
6 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/output/rem/src/App.module.scss:
--------------------------------------------------------------------------------
1 | .header {
2 | text-align: center;
3 | color: red;
4 | font-size: 20px;
5 | }
6 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/performance/basic/src/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => Hello Builder!
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/integration/app-document/static/a.icon:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/integration/app-document/static/a.icon
--------------------------------------------------------------------------------
/tests/integration/basic-app/.env.production:
--------------------------------------------------------------------------------
1 | MODERN_TEST_VAR=modern_prod_value
2 | MODERN_PROD_ONLY=prod_only_value
3 | NODE_ENV=production
4 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-builder/src/entry-1/App.tsx:
--------------------------------------------------------------------------------
1 | export const App = () => {
2 | return Modern APP 1
;
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-builder/src/entry-2/App.tsx:
--------------------------------------------------------------------------------
1 | export const App = () => {
2 | return Modern APP 2
;
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/__auth/login/page.tsx:
--------------------------------------------------------------------------------
1 | export default function Page() {
2 | return auth page
;
3 | }
4 |
--------------------------------------------------------------------------------
/tests/integration/runtime-plugin/fixtures/runtime-custom-config-plugin/src/routes/page.tsx:
--------------------------------------------------------------------------------
1 | export default () => page
;
2 |
--------------------------------------------------------------------------------
/tests/integration/select-entry/fixtures/select-mul-entry/src/bar/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => hello
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/integration/select-entry/fixtures/select-mul-entry/src/baz/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => hello
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/integration/select-entry/fixtures/select-mul-entry/src/foo/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => hello
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/integration/select-entry/fixtures/select-one-entry/src/bar/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => hello
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/integration/select-entry/fixtures/select-one-entry/src/baz/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => hello
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/integration/select-entry/fixtures/select-one-entry/src/foo/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => hello
;
2 |
3 | export default App;
4 |
--------------------------------------------------------------------------------
/tests/integration/server-prod/config/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/integration/server-prod/config/icon.png
--------------------------------------------------------------------------------
/tests/integration/source-code-build/app/.browserslistrc:
--------------------------------------------------------------------------------
1 | chrome >= 51
2 | edge >= 15
3 | firefox >= 54
4 | safari >= 10
5 | ios_saf >= 10
6 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/base-async-entry/src/routes/page.tsx:
--------------------------------------------------------------------------------
1 | export default function Page() {
2 | return hello
;
3 | }
4 |
--------------------------------------------------------------------------------
/.changeset/silver-bars-shave.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/plugin-bff': patch
3 | ---
4 |
5 | fix: corss BFF type prompt
6 | fix: 修复 跨项目 BFF 类型提示问题
7 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/turtorials-example-list.mdx:
--------------------------------------------------------------------------------
1 | - [Route Authorization](/tutorials/examples/csr-auth.html)
2 | - ...
3 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/core/server/react/index.ts:
--------------------------------------------------------------------------------
1 | export { NoSSR } from './nossr';
2 | export { NoSSRCache } from './no-ssr-cache';
3 |
--------------------------------------------------------------------------------
/packages/server/utils/tests/fixtures/ts-example/api/map-alias.ts:
--------------------------------------------------------------------------------
1 | // @ts-expect-error
2 | import core from '@modern-js/runtime';
3 |
4 | core();
5 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/dotenv/package.json:
--------------------------------------------------------------------------------
1 | {"name":"dotenv","version":"10.0.0","license":"BSD-2-Clause","types":"types/index.d.ts"}
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/web-worker/src/index2.js:
--------------------------------------------------------------------------------
1 | console.log('1');
2 | import('./test').then(res => {
3 | console.log('res', res);
4 | });
5 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-custom/src/app-custom/App.tsx:
--------------------------------------------------------------------------------
1 | export default function App() {
2 | return Modern APP
;
3 | }
4 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-custom/src/entry-1/App.tsx:
--------------------------------------------------------------------------------
1 | export default function App() {
2 | return Modern APP-1
;
3 | }
4 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/four/routes/layout.loader.ts:
--------------------------------------------------------------------------------
1 | export default () => {
2 | return {
3 | message: 'root layout',
4 | };
5 | };
6 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/client-loader/page.loader.ts:
--------------------------------------------------------------------------------
1 | export default () => {
2 | return 'page from server loader';
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/error/loader/page.data.ts:
--------------------------------------------------------------------------------
1 | export const loader = () => {
2 | throw new Error('loader error');
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/layout.loader.ts:
--------------------------------------------------------------------------------
1 | export default () => {
2 | return {
3 | message: 'root layout',
4 | };
5 | };
6 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/user/profile/page.data.ts:
--------------------------------------------------------------------------------
1 | export const loader = () => {
2 | return 'request profile page';
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/rsc-csr-routes/src/loader/routes/page.data.ts:
--------------------------------------------------------------------------------
1 | export const loader = async () => {
2 | return 'root page from server';
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/rsc-ssr-routes/src/loader/routes/page.data.ts:
--------------------------------------------------------------------------------
1 | export const loader = async () => {
2 | return 'root page from server';
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/server-prod/config/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/integration/server-prod/config/favicon.ico
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/base/src/routes/layout.loader.ts:
--------------------------------------------------------------------------------
1 | let count = 0;
2 |
3 | export default () => ({
4 | count: count++,
5 | });
6 |
--------------------------------------------------------------------------------
/.changeset/beige-memes-relax.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/runtime': patch
3 | ---
4 |
5 | fix: should get basename correctly
6 | fix: 应该获取到正确的 basename
7 |
--------------------------------------------------------------------------------
/.changeset/hungry-stars-end.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/server-core': patch
3 | ---
4 |
5 | fix: remove ssr.scriptLoading
6 | fix: 移除 ssr.scriptLoading
7 |
--------------------------------------------------------------------------------
/.changeset/plain-numbers-dance.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/server-core': patch
3 | ---
4 |
5 | chore: remove node polyfills
6 | chore: 移除 node polyfills
7 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | pageType: home
3 | ---
4 | # Modern.js - A Progressive React Framework for modern web development
5 |
--------------------------------------------------------------------------------
/packages/document/main-doc/src/index.ts:
--------------------------------------------------------------------------------
1 | import HomeLayout from './pages';
2 |
3 | export { HomeLayout };
4 |
5 | export * from 'rspress/theme';
6 |
--------------------------------------------------------------------------------
/packages/document/main-doc/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/packages/document/main-doc/static/img/favicon.ico
--------------------------------------------------------------------------------
/packages/server/core/src/adapters/node/plugins/index.ts:
--------------------------------------------------------------------------------
1 | export * from './static';
2 | export * from './resource';
3 | export * from './nodeServer';
4 |
--------------------------------------------------------------------------------
/packages/server/core/tests/fixtures/load-plugins/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "test-a": "*",
4 | "test-b": "*"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/default-export/named-function.ts:
--------------------------------------------------------------------------------
1 | export default function namedFunction() {
2 | // empty
3 | }
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/routes/fixtures/router-plugin2/bar.js:
--------------------------------------------------------------------------------
1 | const bar = () => {
2 | return 'bar';
3 | };
4 |
5 | export default bar;
6 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/tests/fixture/a.ts:
--------------------------------------------------------------------------------
1 | export const filename: string = __filename;
2 | export const showFileName = () => filename;
3 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/tests/fixture/test-package-ts/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test-package-ts",
3 | "main": "index.ts"
4 | }
5 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/html/app-icon/src/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/e2e/builder/cases/html/app-icon/src/icon.png
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/html/favicon/src/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/e2e/builder/cases/html/favicon/src/icon.png
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/output/assets/src/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/e2e/builder/cases/output/assets/src/icon.png
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source-map/src/App.jsx:
--------------------------------------------------------------------------------
1 | function App() {
2 | return Hello Builder!
;
3 | }
4 |
5 | export default App;
6 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/user.profile.name/layout.config.ts:
--------------------------------------------------------------------------------
1 | export const handle = {
2 | crumbs: 'user.profile.name.layout',
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/user.profile.name/page.config.ts:
--------------------------------------------------------------------------------
1 | export const handle = {
2 | crumbs: 'user.profile.name.page',
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/rsc-csr-routes/src/loader/routes/redirect/page.tsx:
--------------------------------------------------------------------------------
1 | export default function Page() {
2 | return redirect page
;
3 | }
4 |
--------------------------------------------------------------------------------
/tests/integration/rsc-ssr-routes/src/loader/routes/redirect/page.tsx:
--------------------------------------------------------------------------------
1 | export default function Page() {
2 | return redirect page
;
3 | }
4 |
--------------------------------------------------------------------------------
/.changeset/violet-plants-rescue.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/runtime': patch
3 | ---
4 |
5 | feat(ssr): use Rsbuild's `output.module` config for ESM output
6 |
--------------------------------------------------------------------------------
/packages/cli/plugin-bff/tests/fixtures/function/api/hello.ts:
--------------------------------------------------------------------------------
1 | export const get = ({ query }: { query: Record }) => ({
2 | query,
3 | });
4 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/advanced-features/bff/_meta.json:
--------------------------------------------------------------------------------
1 | ["function", "frameworks", "extend-server", "sdk", "upload", "cross-project"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/advanced-features/bff/_meta.json:
--------------------------------------------------------------------------------
1 | ["function", "frameworks", "extend-server", "sdk", "upload", "cross-project"]
2 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-image/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@rsbuild-image/core/shared';
2 | export * from '@rsbuild-image/core';
3 | export * from './cli';
4 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/exports/head.ts:
--------------------------------------------------------------------------------
1 | import head from 'react-helmet';
2 |
3 | export default head;
4 |
5 | export * from 'react-helmet';
6 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/components/index.tsx:
--------------------------------------------------------------------------------
1 | // Route should not be created just because this file exists
2 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/page.config.ts:
--------------------------------------------------------------------------------
1 | export const handle = {
2 | 'user.page': 'user.page',
3 | };
4 |
--------------------------------------------------------------------------------
/packages/server/server/src/helpers/utils.ts:
--------------------------------------------------------------------------------
1 | import { createDebugger } from '@modern-js/utils';
2 |
3 | export const debug = createDebugger('server');
4 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/tests/fixture/inputImportEsm.ts:
--------------------------------------------------------------------------------
1 | import { bar } from 'test-package-esm';
2 |
3 | export default {
4 | bar,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/tests/fixture/inputImportTs.ts:
--------------------------------------------------------------------------------
1 | import { bar } from 'test-package-ts';
2 |
3 | export default {
4 | bar,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/chalk/package.json:
--------------------------------------------------------------------------------
1 | {"name":"chalk","version":"4.1.2","funding":"https://github.com/chalk/chalk?sponsor=1","license":"MIT"}
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/debug/package.json:
--------------------------------------------------------------------------------
1 | {"name":"debug","author":"Josh Junon ","version":"4.3.4","license":"MIT"}
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/src/cli/is/index.ts:
--------------------------------------------------------------------------------
1 | export * from './env';
2 | export * from './type';
3 | export * from './config';
4 | export * from './project';
5 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/dev/hmr/src/App.tsx:
--------------------------------------------------------------------------------
1 | import './App.css';
2 |
3 | const App = () => Hello Builder!
;
4 | export default App;
5 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/output/rem/src/types.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.module.css';
2 | declare module '*.module.scss';
3 | declare module '*.module.less';
4 |
--------------------------------------------------------------------------------
/tests/integration/basic-app/modern.config.ts:
--------------------------------------------------------------------------------
1 | import { applyBaseConfig } from '../../utils/applyBaseConfig';
2 |
3 | export default applyBaseConfig({});
4 |
--------------------------------------------------------------------------------
/tests/integration/image-component/src/routes/crab.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/integration/image-component/src/routes/crab.png
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/__auth/__shop/item/page.tsx:
--------------------------------------------------------------------------------
1 | export default function Page() {
2 | return manage item page
;
3 | }
4 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/redirect/page.tsx:
--------------------------------------------------------------------------------
1 | const Page = () => {
2 | return redirect
;
3 | };
4 |
5 | export default Page;
6 |
--------------------------------------------------------------------------------
/tests/integration/rsc-csr-app/src/components/Counter.css:
--------------------------------------------------------------------------------
1 | .client-component {
2 | border: 3px blue dashed;
3 | margin: 1em;
4 | padding: 1em;
5 | }
6 |
--------------------------------------------------------------------------------
/tests/integration/rsc-csr-routes/src/loader/routes/page.data.client.ts:
--------------------------------------------------------------------------------
1 | export const loader = async () => {
2 | return 'root page from client';
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/rsc-ssr-routes/src/loader/routes/page.data.client.ts:
--------------------------------------------------------------------------------
1 | export const loader = async () => {
2 | return 'root page from client';
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/server-prod/src/assets/favicon1.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/integration/server-prod/src/assets/favicon1.ico
--------------------------------------------------------------------------------
/.changeset/cool-numbers-laugh.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/plugin-bff': patch
3 | ---
4 |
5 | feat(bff):should not compress the api response
6 | feat(bff): 不应该压缩 bff 的响应
--------------------------------------------------------------------------------
/.changeset/young-comics-drive.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/server-core': patch
3 | ---
4 |
5 | feat: hono bff req support node 24
6 | feat: hono bff req 支持 node 24
7 |
--------------------------------------------------------------------------------
/packages/cli/plugin-bff/tests/fixtures/function/api/upload.ts:
--------------------------------------------------------------------------------
1 | export const get = ({ query }: { query: Record }) => ({
2 | query,
3 | });
4 |
--------------------------------------------------------------------------------
/packages/cli/plugin-bff/tests/fixtures/function/api/user/[id].ts:
--------------------------------------------------------------------------------
1 | export const get = ({ query }: { query: Record }) => ({
2 | query,
3 | });
4 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/advanced-features/page-performance/_meta.json:
--------------------------------------------------------------------------------
1 | ["code-split", "inline-assets", "optimize-bundle", "react-compiler"]
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/enable-bff-caution.mdx:
--------------------------------------------------------------------------------
1 | :::tip
2 | 请先在当前项目的根目录使用 [new 命令](/apis/app/commands#modern-new) 启用 BFF 功能。
3 |
4 | :::
5 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/init-rspack-app.mdx:
--------------------------------------------------------------------------------
1 | ```bash
2 | $ npx @modern-js/create@latest myapp
3 | ? 请选择开发语言:TS
4 | ? 请选择包管理工具:pnpm
5 | ```
6 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/release-note.mdx:
--------------------------------------------------------------------------------
1 | 根据官网 [Release Note](https://github.com/web-infra-dev/modern.js/releases),开发者也可以手动将项目升级到想要的版本。
2 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/advanced-features/page-performance/_meta.json:
--------------------------------------------------------------------------------
1 | ["code-split", "inline-assets", "optimize-bundle", "react-compiler"]
2 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/document/type.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@modern-js/runtime/document' {
2 | export * from '@modern-js/runtime/document';
3 | }
4 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/router/internal.ts:
--------------------------------------------------------------------------------
1 | export * from './runtime/internal';
2 | export { routerPlugin as default } from './runtime/internal';
3 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/document/feature/document.tsx:
--------------------------------------------------------------------------------
1 | const Document = () => {
2 | return '';
3 | };
4 | export default Document;
5 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/__auth/layout.config.ts:
--------------------------------------------------------------------------------
1 | export const handle = {
2 | 'auth.layout': 'auth.layout',
3 | };
4 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/layout.config.ts:
--------------------------------------------------------------------------------
1 | export const handle = {
2 | 'user.layout': 'user.layout',
3 | };
4 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/types/index.d.ts:
--------------------------------------------------------------------------------
1 | declare module 'http' {
2 | interface ServerResponse {
3 | locals: Record;
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/server/core/src/types/index.ts:
--------------------------------------------------------------------------------
1 | export * from './config';
2 | export * from './plugins';
3 | export * from './render';
4 | export * from './server';
5 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/src/builder/shared/index.ts:
--------------------------------------------------------------------------------
1 | export * from './types';
2 | export * from './builderPlugins';
3 | export * from './createCopyInfo';
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/src/plugins/deploy/platforms/vercel-entry.mjs:
--------------------------------------------------------------------------------
1 | import { handler } from './vercel-handler.cjs';
2 |
3 | export default handler;
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/src/types/utils.ts:
--------------------------------------------------------------------------------
1 | export type UnwrapBuilderConfig<
2 | Config,
3 | Key extends keyof Config,
4 | > = Required[Key];
5 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/routes/fixtures/router-plugin1/routes/bar.js:
--------------------------------------------------------------------------------
1 | const bar = () => {
2 | return 'bar';
3 | };
4 |
5 | export default bar;
6 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/routes/fixtures/router-plugin3/routes/bar.js:
--------------------------------------------------------------------------------
1 | const bar = () => {
2 | return 'bar';
3 | };
4 |
5 | export default bar;
6 |
--------------------------------------------------------------------------------
/packages/toolkit/plugin/src/cli/run/utils/debug.ts:
--------------------------------------------------------------------------------
1 | import { createDebugger } from '@modern-js/utils';
2 |
3 | export const debug = createDebugger('plugin');
4 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/chokidar/fsevents.node:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/packages/toolkit/utils/compiled/chokidar/fsevents.node
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/fs-extra/package.json:
--------------------------------------------------------------------------------
1 | {"name":"fs-extra","author":"JP Richardson ","version":"10.0.1","license":"MIT"}
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/inquirer/package.json:
--------------------------------------------------------------------------------
1 | {"name":"inquirer","author":"Simon Boudrias ","version":"8.2.2","license":"MIT"}
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/js-yaml/package.json:
--------------------------------------------------------------------------------
1 | {"name":"js-yaml","author":"Vladimir Zapparov ","version":"4.1.0","license":"MIT"}
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/output/assets-url/src/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/e2e/builder/cases/output/assets-url/src/icon.png
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/output/rem/src/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/e2e/builder/cases/output/rem/src/assets/icon.png
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-custom-entries/src/app-custom-entries/App.tsx:
--------------------------------------------------------------------------------
1 | export default function App() {
2 | return Modern APP
;
3 | }
4 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-custom-entries/src/entry-1/App.tsx:
--------------------------------------------------------------------------------
1 | export default function App() {
2 | return Modern APP-1
;
3 | }
4 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-route/src/routes/user/page.tsx:
--------------------------------------------------------------------------------
1 | const Page = () => {
2 | return User
;
3 | };
4 |
5 | export default Page;
6 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/error/loader/page.data.client.ts:
--------------------------------------------------------------------------------
1 | export const loader = async () => {
2 | return 'render by client loader';
3 | };
4 |
--------------------------------------------------------------------------------
/tests/integration/server-prod/src/activity/App.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const App = () => Activity page
;
4 |
5 | export default App;
6 |
--------------------------------------------------------------------------------
/tests/integration/server-routes/src/App.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default function App() {
4 | return Hello Modern.js
;
5 | }
6 |
--------------------------------------------------------------------------------
/.changeset/huge-moons-chew.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/runtime': patch
3 | ---
4 |
5 | fix: correct route path construction in optimizeRoute function
6 | fix: 纠正路由路径约定
7 |
--------------------------------------------------------------------------------
/.changeset/old-cougars-ring.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/server-core': patch
3 | ---
4 |
5 | feat: support forceCSR at the entry level
6 | feat: 支持 forceCSR 在 entry 级别
7 |
--------------------------------------------------------------------------------
/.changeset/shaggy-wombats-peel.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/plugin': patch
3 | ---
4 |
5 | fix: plugin merge config for array type
6 |
7 | fix: 修复对于数组类型的配置,合并配置之后出现重复问题
8 |
--------------------------------------------------------------------------------
/packages/cli/builder/modern.config.ts:
--------------------------------------------------------------------------------
1 | import { tscLikeBuildConfig } from '@scripts/build';
2 |
3 | export default {
4 | buildConfig: tscLikeBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/cli/plugin-bff/tests/helper.ts:
--------------------------------------------------------------------------------
1 | import { initSnapshotSerializer } from '@scripts/jest-config/utils';
2 |
3 | initSnapshotSerializer({ cwd: __dirname });
4 |
--------------------------------------------------------------------------------
/packages/cli/plugin-tailwind/src/index.ts:
--------------------------------------------------------------------------------
1 | import { tailwindcssPlugin } from './cli';
2 |
3 | export { tailwindcssPlugin };
4 | export default tailwindcssPlugin;
5 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/extend-bff-function.mdx:
--------------------------------------------------------------------------------
1 | 普通的 BFF 函数写法有时并不能满足需求,我们正在设计一套更强大的 BFF 函数写法,让开发者更方便地扩展 BFF 函数。
2 |
3 | :::note
4 | 敬请期待
5 | :::
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/language-config.mdx:
--------------------------------------------------------------------------------
1 | ### language
2 |
3 | 问题:请选择开发语言
4 |
5 | 选项:
6 |
7 | - TS -- ts
8 |
9 | - ES6+ -- js
10 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/core/context/request/index.tsx:
--------------------------------------------------------------------------------
1 | export const getRequest: () => Request = () => {
2 | return new Request(location.href);
3 | };
4 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/document/feature/src/Document.tsx:
--------------------------------------------------------------------------------
1 | const Document = () => {
2 | return '/src
';
3 | };
4 | export default Document;
5 |
--------------------------------------------------------------------------------
/packages/server/utils/tests/fixtures/ts-example/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | declare module '@modern-js/runtime/server' {
2 | export const useContext: () => string;
3 | }
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/src/constants.ts:
--------------------------------------------------------------------------------
1 | export const DEFAULT_CONFIG_FILE = 'modern.config';
2 | export const DEFAULT_RUNTIME_CONFIG_FILE = 'modern.runtime';
3 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/src/plugins/deploy/platforms/vercel-entry.js:
--------------------------------------------------------------------------------
1 | const { handler } = require('./vercel-handler.cjs');
2 |
3 | module.exports = handler;
4 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/lodash/package.json:
--------------------------------------------------------------------------------
1 | {"name":"lodash","author":"John-David Dalton ","version":"4.17.21","license":"MIT"}
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/html/template/src/assets/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/e2e/builder/cases/html/template/src/assets/icon.png
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/output/assets-inline/src/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/e2e/builder/cases/output/assets-inline/src/icon.png
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/output/assets__inline/src/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/e2e/builder/cases/output/assets__inline/src/icon.png
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/test.js:
--------------------------------------------------------------------------------
1 | export const printLog = () => {
2 | const arr = [1, 2, 3, 4, [5, 6, [7, 8]]];
3 | console.log(arr, arr.flat());
4 | };
5 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/wasm/wasm-async/src/factorial.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/e2e/builder/cases/wasm/wasm-async/src/factorial.wasm
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/wasm/wasm-basic/src/factorial.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/e2e/builder/cases/wasm/wasm-basic/src/factorial.wasm
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/wasm/wasm-url/src/factorial.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/e2e/builder/cases/wasm/wasm-url/src/factorial.wasm
--------------------------------------------------------------------------------
/tests/integration/nonce/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/tests/integration/rsbuild-hook/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/tests/integration/rsc-ssr-app/src/client-component-root/components/Counter.tsx:
--------------------------------------------------------------------------------
1 | 'use client';
2 | export function Counter() {
3 | return Counter
;
4 | }
5 |
--------------------------------------------------------------------------------
/tests/integration/ssg/fixtures/mega-list-routes/src/routes/layout.jsx:
--------------------------------------------------------------------------------
1 | import { Outlet } from '@modern-js/runtime/router';
2 |
3 | export default () => ;
4 |
--------------------------------------------------------------------------------
/tests/integration/ssg/fixtures/nested-routes/src/routes/layout.jsx:
--------------------------------------------------------------------------------
1 | import { Outlet } from '@modern-js/runtime/router';
2 |
3 | export default () => ;
4 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/base/src/routes/redirect/page.tsx:
--------------------------------------------------------------------------------
1 | const Page = () => {
2 | return Redirect page
;
3 | };
4 |
5 | export default Page;
6 |
--------------------------------------------------------------------------------
/tests/integration/tailwindcss/fixtures/tailwindcss-without-plugin/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/packages/cli/babel-preset/modern.config.ts:
--------------------------------------------------------------------------------
1 | import { tscLikeBuildConfig } from '@scripts/build';
2 |
3 | export default {
4 | buildConfig: tscLikeBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/cli/plugin-styled-components/src/styled.ts:
--------------------------------------------------------------------------------
1 | import styled from 'styled-components';
2 |
3 | export default styled;
4 |
5 | export * from 'styled-components';
6 |
--------------------------------------------------------------------------------
/packages/cli/plugin-tailwind/tests/fixtures/twin-macro/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@unit-test/twin-macro",
3 | "dependencies": {},
4 | "devDependencies": {}
5 | }
6 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/rspackTip.mdx:
--------------------------------------------------------------------------------
1 | :::tip Rspack - 高性能 Web 构建工具
2 |
3 | import Rspack from './rspack.mdx';
4 |
5 |
6 |
7 | :::
8 |
--------------------------------------------------------------------------------
/packages/server/core/src/types/config/dev.ts:
--------------------------------------------------------------------------------
1 | export interface DevUserConfig {
2 | assetPrefix?: string;
3 | }
4 |
5 | export type DevNormalizedConfig = DevUserConfig;
6 |
--------------------------------------------------------------------------------
/packages/server/core/tests/fixtures/render/ssr/bundles/main-server-loaders.js:
--------------------------------------------------------------------------------
1 | export async function handleRequest() {
2 | return new Response('handle main');
3 | }
4 |
--------------------------------------------------------------------------------
/packages/server/core/tests/fixtures/render/ssr/bundles/user-server-loaders.js:
--------------------------------------------------------------------------------
1 | export async function handleRequest() {
2 | return new Response('handle user');
3 | }
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/html-templates/custom-partial/config/html/head.html:
--------------------------------------------------------------------------------
1 | custom head template
2 | <%= process.env.NODE_ENV %>
3 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/tests/fixture/inputImportEsmWithCjs.ts:
--------------------------------------------------------------------------------
1 | import { bar } from 'test-package-esm-with-cjs';
2 |
3 | export default {
4 | bar,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/dotenv-expand/package.json:
--------------------------------------------------------------------------------
1 | {"name":"dotenv-expand","author":"motdotla","version":"5.1.0","license":"BSD-2-Clause","types":"./index.d.ts"}
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/json5/lib/index.d.ts:
--------------------------------------------------------------------------------
1 | import parse = require('./parse')
2 | import stringify = require('./stringify')
3 |
4 | export {parse, stringify}
5 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/tsconfig-paths/package.json:
--------------------------------------------------------------------------------
1 | {"name":"tsconfig-paths","author":"Jonas Kello","version":"4.1.1","license":"MIT","types":"lib/index.d.ts"}
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/output/assets-no-inline/src/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/e2e/builder/cases/output/assets-no-inline/src/icon.png
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/resolve-extension-prefix/src/App.jsx:
--------------------------------------------------------------------------------
1 | function App() {
2 | return Hello Builder!
;
3 | }
4 |
5 | export default App;
6 |
--------------------------------------------------------------------------------
/tests/integration/basic-app/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/tests/integration/deploy-server/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-custom-routes/src/routes/page.tsx:
--------------------------------------------------------------------------------
1 | const Page = () => {
2 | return Modern APP
;
3 | };
4 |
5 | export default Page;
6 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-custom-routes/src/routes/user/page.tsx:
--------------------------------------------------------------------------------
1 | const Page = () => {
2 | return User
;
3 | };
4 |
5 | export default Page;
6 |
--------------------------------------------------------------------------------
/tests/integration/ssg/fixtures/web-server/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/base-json/src/routes/redirect/page.tsx:
--------------------------------------------------------------------------------
1 | const Page = () => {
2 | return Redirect page
;
3 | };
4 |
5 | export default Page;
6 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/streaming/src/routes/redirect/page.tsx:
--------------------------------------------------------------------------------
1 | const Page = () => {
2 | return Redirect page
;
3 | };
4 |
5 | export default Page;
6 |
--------------------------------------------------------------------------------
/tests/integration/temp-dir/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/plugin/official/_meta.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "type": "dir",
4 | "name": "cli-plugins",
5 | "label": "cli-plugins"
6 | }
7 | ]
8 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/advanced-features/bff/upload.mdx:
--------------------------------------------------------------------------------
1 | # 文件上传
2 |
3 | import BffUpload from "@site-docs/components/bff-upload";
4 |
5 |
6 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/plugin/official/_meta.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "type": "dir",
4 | "name": "cli-plugins",
5 | "label": "cli-plugins"
6 | }
7 | ]
8 |
--------------------------------------------------------------------------------
/packages/generator/generators/entry-generator/src/locale/zh.ts:
--------------------------------------------------------------------------------
1 | export const ZH_LOCALE = {
2 | package_not_exist: '当前项目不存在 "package.json"',
3 | success: '创建入口成功!',
4 | };
5 |
--------------------------------------------------------------------------------
/packages/generator/new-action/modern.config.js:
--------------------------------------------------------------------------------
1 | const { nodeBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: nodeBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/generator/new-action/tests/fixtures/err.json:
--------------------------------------------------------------------------------
1 | {
2 | "devDependencies": {
3 | "@modern-js/app-tools": "2",
4 | "@modern-js/module-tools": "2"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/packages/generator/sandpack-react/src/templates/index.ts:
--------------------------------------------------------------------------------
1 | const { MWAFiles } = require('./mwa');
2 |
3 | export const ModernTemplates = {
4 | 'web-app': MWAFiles,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/server/server/src/dev-tools/https/global.d.ts:
--------------------------------------------------------------------------------
1 | declare module 'selfsigned' {
2 | function generate(attributes: any, opt: any): { private: any; cert: any };
3 | }
4 |
--------------------------------------------------------------------------------
/packages/server/utils/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/src/plugins/deploy/platforms/netlify-entry.cjs:
--------------------------------------------------------------------------------
1 | const { handler } = require('./netlify-handler.cjs');
2 |
3 | module.exports.default = handler;
4 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/tests/fixture/test-package-esm/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test-package-esm",
3 | "type": "module",
4 | "main": "index.js"
5 | }
6 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/address/package.json:
--------------------------------------------------------------------------------
1 | {"name":"address","author":"fengmk2 ","version":"1.1.2","license":"MIT","types":"lib/address.d.ts"}
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/performance/load-resource/src/test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/e2e/builder/cases/performance/load-resource/src/test.png
--------------------------------------------------------------------------------
/tests/integration/custom-file-system-entry/src/custom/page.tsx:
--------------------------------------------------------------------------------
1 | const App = () => {
2 | return custom entry
;
3 | };
4 |
5 | export default App;
6 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-custom-entries/src/entry-2/routes/user/page.tsx:
--------------------------------------------------------------------------------
1 | const Page = () => {
2 | return User
;
3 | };
4 |
5 | export default Page;
6 |
--------------------------------------------------------------------------------
/tests/integration/main-entry-name/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/tests/integration/rsc-ssr-app/src/server-component-root/components/Counter.css:
--------------------------------------------------------------------------------
1 | .client-component {
2 | border: 3px blue dashed;
3 | margin: 1em;
4 | padding: 1em;
5 | }
6 |
--------------------------------------------------------------------------------
/tests/integration/server-json-script/src/routes/page.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default function App() {
4 | return Hello Modern.js
;
5 | }
6 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/streaming-inline/src/routes/redirect/page.tsx:
--------------------------------------------------------------------------------
1 | const Page = () => {
2 | return Redirect page
;
3 | };
4 |
5 | export default Page;
6 |
--------------------------------------------------------------------------------
/tests/integration/write-to-dist/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/.changeset/short-hornets-smile.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/runtime': patch
3 | ---
4 |
5 | fix: solve the problem of react19 streaming rendering failure
6 | fix: 解决 react19 下流式渲染失效的问题
7 |
--------------------------------------------------------------------------------
/packages/cli/plugin-bff/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/cli/plugin-i18n/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/cli/plugin-ssg/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/generator/generator-utils/modern.config.js:
--------------------------------------------------------------------------------
1 | const { nodeBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: nodeBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/generator/generators/mwa-generator/templates/base-template/.browserslistrc.handlebars:
--------------------------------------------------------------------------------
1 | chrome >= 51
2 | edge >= 15
3 | firefox >= 54
4 | safari >= 10
5 | ios_saf >= 10
6 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/exports/loadable.ts:
--------------------------------------------------------------------------------
1 | import loadable from '@loadable/component';
2 |
3 | export default loadable;
4 |
5 | export * from '@loadable/component';
6 |
--------------------------------------------------------------------------------
/packages/runtime/render/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/server/bff-core/src/utils/debug.ts:
--------------------------------------------------------------------------------
1 | import { createDebugger } from '@modern-js/utils';
2 |
3 | export const debug: (...args: unknown[]) => void = createDebugger('bff');
4 |
--------------------------------------------------------------------------------
/packages/server/server/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/analyze/fixtures/default-export/export-variable.ts:
--------------------------------------------------------------------------------
1 | const exportVariable = () => {
2 | // empty
3 | };
4 |
5 | export default exportVariable;
6 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/fixtures/subcommand/src/index.ts:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export const main = async () => {
4 | console.info(React.version);
5 | };
6 |
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/src/constants.ts:
--------------------------------------------------------------------------------
1 | export const defaultDistFileExtMap = {
2 | '.js': '.js',
3 | '.jsx': '.js',
4 | '.ts': '.js',
5 | '.tsx': '.js',
6 | };
7 |
--------------------------------------------------------------------------------
/packages/toolkit/create/modern.config.js:
--------------------------------------------------------------------------------
1 | const { generatorBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: generatorBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/modern.config.js:
--------------------------------------------------------------------------------
1 | const { nodeBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: nodeBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/toolkit/plugin/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/toolkit/upgrade/modern.config.js:
--------------------------------------------------------------------------------
1 | const { generatorBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: generatorBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/json5/package.json:
--------------------------------------------------------------------------------
1 | {"name":"json5","author":"Aseem Kishore ","version":"2.2.3","license":"MIT","types":"lib/index.d.ts"}
2 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-entry/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-route/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/client-loader/layout.data.client.ts:
--------------------------------------------------------------------------------
1 | const loader = () => {
2 | return 'layout from client loader';
3 | };
4 |
5 | export { loader };
6 |
--------------------------------------------------------------------------------
/tests/integration/rsc-csr-app/src/App.module.less:
--------------------------------------------------------------------------------
1 | .root {
2 | background-color: rgb(195, 255, 0);
3 | border: 3px red dashed;
4 | margin: 1em;
5 | padding: 1em;
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/tests/integration/source-code-build/app/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/partial/src/one/routes/a/page.data.ts:
--------------------------------------------------------------------------------
1 | export const loader = () => {
2 | console.log(document.querySelector);
3 | return 'PageA Data';
4 | };
5 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/partial/src/one/routes/b/d/page.data.ts:
--------------------------------------------------------------------------------
1 | export const loader = () => {
2 | console.log(document.querySelector);
3 | return 'PageD Data';
4 | };
5 |
--------------------------------------------------------------------------------
/packages/cli/plugin-bff/src/runtime/hono/index.ts:
--------------------------------------------------------------------------------
1 | export * from '@modern-js/bff-core';
2 | export { useHonoContext } from '@modern-js/server-core';
3 | export * from './operators';
4 |
--------------------------------------------------------------------------------
/packages/cli/plugin-data-loader/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/cli/plugin-tailwind/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/advanced-features/bff/upload.mdx:
--------------------------------------------------------------------------------
1 | # File Upload
2 |
3 | import BffUpload from "@site-docs-en/components/bff-upload";
4 |
5 |
6 |
--------------------------------------------------------------------------------
/packages/generator/generator-utils/src/locale/zh.ts:
--------------------------------------------------------------------------------
1 | export const ZH_LOCALE = {
2 | packageName: { exit: '项目名称 {value} 已存在' },
3 | packagePath: { exit: '目录 {value} 已存在' },
4 | };
5 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/server/bff-runtime/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/server/core/src/types/config/security.ts:
--------------------------------------------------------------------------------
1 | export interface SecurityUserConfig {
2 | nonce?: string;
3 | }
4 |
5 | export type SecurityNormalizedConfig = SecurityUserConfig;
6 |
--------------------------------------------------------------------------------
/packages/server/create-request/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/server/plugin-polyfill/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/server/prod-server/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/server/server-runtime/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/server/utils/tests/fixtures/api/_app.ts:
--------------------------------------------------------------------------------
1 | import { hook } from '../../../src';
2 |
3 | export default hook(({ addMiddleware }) => {
4 | addMiddleware('@koa/api');
5 | });
6 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/src/types/config/resolve.ts:
--------------------------------------------------------------------------------
1 | import type { BuilderConfig } from '@modern-js/builder';
2 |
3 | export type ResolveUserConfig = BuilderConfig['resolve'];
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/fixtures/subcommand/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "app-tools-subcommand-test",
3 | "devDependencies": {
4 | "react": "^19.1.1"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/packages/toolkit/compiler/babel/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/performance/load-resource/src/page1/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/tests/e2e/builder/cases/performance/load-resource/src/page1/icon.png
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/source-exclude/src/test.js:
--------------------------------------------------------------------------------
1 | export const printLog = () => {
2 | const arr = [1, 2, 3, 4, [5, 6, [7, 8]]];
3 | console.log(arr, arr.flat());
4 | };
5 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-server-entry/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/tests/integration/image-component/src/routes/layout.tsx:
--------------------------------------------------------------------------------
1 | import { Outlet } from '@modern-js/runtime/router';
2 |
3 | export default function Layout() {
4 | return ;
5 | }
6 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/deploy.mdx:
--------------------------------------------------------------------------------
1 | After local develop, you can refer to the [Deployment](/guides/basic-features/deploy.html) section to deploy the project to the server.
--------------------------------------------------------------------------------
/packages/generator/generator-cases/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/generator/generator-common/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/generator/generator-common/tests/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "baseUrl": "../"
5 | },
6 | "include": ["**/*"]
7 | }
8 |
--------------------------------------------------------------------------------
/packages/generator/generators/bff-generator/src/locale/en.ts:
--------------------------------------------------------------------------------
1 | export const EN_LOCALE = {
2 | success: `Plugin dependency installed successfully! Please add the following code to`,
3 | };
4 |
--------------------------------------------------------------------------------
/packages/generator/generators/ssg-generator/src/locale/en.ts:
--------------------------------------------------------------------------------
1 | export const EN_LOCALE = {
2 | success: `Plugin dependency installed successfully! Please add the following code to`,
3 | };
4 |
--------------------------------------------------------------------------------
/packages/generator/sandpack-react/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user.profile.name/page.config.ts:
--------------------------------------------------------------------------------
1 | export const handle = {
2 | 'user.profile.name.page': 'user.profile.name.page',
3 | };
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/src/builder/shared/bundlerPlugins/index.ts:
--------------------------------------------------------------------------------
1 | export * from './HtmlAsyncChunkPlugin';
2 | export * from './HtmlBottomTemplate';
3 | export * from './RouterPlugin';
4 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/src/exports/server.ts:
--------------------------------------------------------------------------------
1 | export type { ServerPlugin } from '@modern-js/server-core';
2 |
3 | export { defineServerConfig as defineConfig } from '../utils/config';
4 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/commander/package.json:
--------------------------------------------------------------------------------
1 | {"name":"commander","author":"TJ Holowaychuk ","version":"10.0.0","license":"MIT","types":"typings/index.d.ts"}
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/url-join/package.json:
--------------------------------------------------------------------------------
1 | {"name":"url-join","author":"José F. Romaniello (http://joseoncode.com)","version":"4.0.1","license":"MIT"}
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/check-syntax/fixtures/basic/src/test.js:
--------------------------------------------------------------------------------
1 | export const printLog = () => {
2 | const arr = [1, 2, 3, 4, [5, 6, [7, 8]]];
3 | console.log(arr, arr.flat());
4 | };
5 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/check-syntax/fixtures/esnext/src/test.js:
--------------------------------------------------------------------------------
1 | export const printLog = () => {
2 | const arr = [1, 2, 3, 4, [5, 6, [7, 8]]];
3 | console.log(arr, arr?.flat());
4 | };
5 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/performance/load-resource/src/page2/App.tsx:
--------------------------------------------------------------------------------
1 | const App = () => (
2 | <>
3 | Hello Builder!
4 | >
5 | );
6 |
7 | export default App;
8 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/wasm/wasm-url/src/index.js:
--------------------------------------------------------------------------------
1 | const wasmPath = new URL('./factorial.wasm', import.meta.url).pathname;
2 |
3 | document.querySelector('#root').innerHTML = wasmPath;
4 |
--------------------------------------------------------------------------------
/tests/integration/bff-corss-project/bff-api-app/api/user/[id].ts:
--------------------------------------------------------------------------------
1 | export default async (id: string) => {
2 | return {
3 | id,
4 | message: `bff-api-app/user/[id]`,
5 | };
6 | };
7 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/client-loader/layout.data.ts:
--------------------------------------------------------------------------------
1 | export const loader = () => {
2 | // throw new Error('nnnnnnnnn');
3 | return 'layout from server loader';
4 | };
5 |
--------------------------------------------------------------------------------
/tests/integration/select-entry/fixtures/select-mul-entry/modern.config.ts:
--------------------------------------------------------------------------------
1 | import { applyBaseConfig } from '../../../../utils/applyBaseConfig';
2 |
3 | export default applyBaseConfig({});
4 |
--------------------------------------------------------------------------------
/tests/integration/select-entry/fixtures/select-one-entry/modern.config.ts:
--------------------------------------------------------------------------------
1 | import { applyBaseConfig } from '../../../../utils/applyBaseConfig';
2 |
3 | export default applyBaseConfig();
4 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/partial/src/one/routes/b/page.data.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs/promises';
2 |
3 | export const loader = () => {
4 | typeof fs;
5 | return 'PageB Data';
6 | };
7 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/partial/src/one/routes/layout.data.ts:
--------------------------------------------------------------------------------
1 | import fs from 'fs/promises';
2 |
3 | export const loader = () => {
4 | typeof fs;
5 | return 'root layout';
6 | };
7 |
--------------------------------------------------------------------------------
/tests/integration/tailwindcss/fixtures/tailwindcss-v3-js-config-with-postcss-config/postcss.config.ts:
--------------------------------------------------------------------------------
1 | const path = require('node:path');
2 |
3 | export default {
4 | plugins: {},
5 | };
6 |
--------------------------------------------------------------------------------
/.changeset/clever-views-smile.md:
--------------------------------------------------------------------------------
1 | ---
2 | 'server-config': patch
3 | '@modern-js/types': patch
4 | '@modern-js/server-core': patch
5 | ---
6 |
7 | chore: remove bff proxy
8 | chore: 移除 bff proxy
9 |
--------------------------------------------------------------------------------
/packages/cli/plugin-styled-components/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/rspackTip.mdx:
--------------------------------------------------------------------------------
1 | :::tip Rspack - A High Performance JavaScript Bundler
2 |
3 | import Rspack from './rspack.mdx';
4 |
5 |
6 |
7 | :::
8 |
--------------------------------------------------------------------------------
/packages/generator/generators/dependence-generator/src/locale/en.ts:
--------------------------------------------------------------------------------
1 | export const EN_LOCALE = {
2 | success: `Plugin dependency installed successfully! Please add the following code to`,
3 | };
4 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/core/context/monitors/index.ts:
--------------------------------------------------------------------------------
1 | import { defaultMonitors } from './default';
2 |
3 | export const getMonitors = () => {
4 | return defaultMonitors;
5 | };
6 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/src/types/config/security.ts:
--------------------------------------------------------------------------------
1 | import type { BuilderConfig } from '@modern-js/builder';
2 |
3 | export type SecurityUserConfig = Required['security'];
4 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/slash/package.json:
--------------------------------------------------------------------------------
1 | {"name":"slash","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"version":"3.0.0","license":"MIT"}
2 |
--------------------------------------------------------------------------------
/tests/integration/rsc-ssr-app/src/client-component-root/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/tests/integration/server-prod/src/server-prod/App.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const App = () => Hello, Modern.js !
;
4 |
5 | export default App;
6 |
--------------------------------------------------------------------------------
/tests/integration/ssr/tests/__snapshots__/base.test.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Traditional SSR error thrown in client navigation 1`] = `"error occurs"`;
4 |
--------------------------------------------------------------------------------
/tests/integration/tailwindcss/fixtures/tailwindcss-v3-js-config/tailwind.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | theme: {
3 | colors: {
4 | 'red-500': '#1fb6ff',
5 | },
6 | },
7 | };
8 |
--------------------------------------------------------------------------------
/tests/integration/tailwindcss/fixtures/tailwindcss-v3-merge-config/tailwind.config.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | theme: {
3 | colors: {
4 | 'red-500': '#1fb6ff',
5 | },
6 | },
7 | };
8 |
--------------------------------------------------------------------------------
/tests/integration/tailwindcss/fixtures/tailwindcss-v3-ts-config/tailwind.config.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | theme: {
3 | colors: {
4 | 'red-500': '#1fb6ff',
5 | },
6 | },
7 | };
8 |
--------------------------------------------------------------------------------
/tests/integration/transform-import/modern.config.ts:
--------------------------------------------------------------------------------
1 | import { appTools, defineConfig } from '@modern-js/app-tools';
2 |
3 | export default defineConfig({
4 | plugins: [appTools()],
5 | });
6 |
--------------------------------------------------------------------------------
/.changeset/bitter-cars-drive.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/runtime': patch
3 | ---
4 |
5 | fix: replace should use function as second param in case not be a pattern replace
6 | fix: replace 应该使用函数,防止成为模式替换
7 |
--------------------------------------------------------------------------------
/packages/cli/flight-server-transform-plugin/tests/fixture/default-actions/arrow/input.tsx:
--------------------------------------------------------------------------------
1 | import { z } from 'zod';
2 |
3 | export default () => {
4 | 'use server';
5 | return `default`;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/generator/generators/bff-generator/modern.config.js:
--------------------------------------------------------------------------------
1 | const { generatorBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: generatorBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/generator/generators/entry-generator/modern.config.js:
--------------------------------------------------------------------------------
1 | const { generatorBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: generatorBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/generator/generators/entry-generator/src/locale/en.ts:
--------------------------------------------------------------------------------
1 | export const EN_LOCALE = {
2 | package_not_exist: 'project not exist "package.json"',
3 | success: 'create entry success!',
4 | };
5 |
--------------------------------------------------------------------------------
/packages/generator/generators/server-generator/modern.config.js:
--------------------------------------------------------------------------------
1 | const { generatorBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: generatorBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/generator/generators/ssg-generator/modern.config.js:
--------------------------------------------------------------------------------
1 | const { generatorBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: generatorBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user.profile.name/layout.config.ts:
--------------------------------------------------------------------------------
1 | export const handle = {
2 | 'user.profile.name.layout': 'user.profile.name.layout',
3 | };
4 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/modern.config.js:
--------------------------------------------------------------------------------
1 | const { universalBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: universalBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/server/bff-core/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './storage';
2 | export * from './alias';
3 | export { debug } from './debug';
4 | export * from './meta';
5 | export * from './validate';
6 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/filesize/package.json:
--------------------------------------------------------------------------------
1 | {"name":"filesize","author":"Jason Mulligan ","version":"8.0.7","license":"BSD-3-Clause","types":"filesize.d.ts"}
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/minimist/package.json:
--------------------------------------------------------------------------------
1 | {"name":"minimist","author":{"name":"James Halliday","email":"mail@substack.net","url":"http://substack.net"},"version":"1.2.6","license":"MIT"}
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/pkg-up/package.json:
--------------------------------------------------------------------------------
1 | {"name":"pkg-up","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"version":"3.1.0","license":"MIT"}
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/react-server-dom-webpack/README.md:
--------------------------------------------------------------------------------
1 | # react-server-dom-webpack
2 |
3 | Experimental React Flight bindings for DOM using Webpack.
4 |
5 | **Use it at your own risk.**
6 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/upath/package.json:
--------------------------------------------------------------------------------
1 | {"name":"upath","author":{"name":"Angelos Pikoulas","email":"agelos.pikoulas@gmail.com"},"version":"2.0.1","license":"MIT","types":"./upath.d.ts"}
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/webpack-chain/package.json:
--------------------------------------------------------------------------------
1 | {"name":"webpack-chain","author":"Eli Perelman ","version":"8.0.1","license":"MPL-2.0","typings":"types/index.d.ts"}
2 |
--------------------------------------------------------------------------------
/scripts/prebundle/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@modern-js/tsconfig/base",
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist"
6 | },
7 | "include": ["src"]
8 | }
9 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/performance/load-resource/src/test.ts:
--------------------------------------------------------------------------------
1 | import './test.css';
2 | // @ts-expect-error
3 | import Png from './test.png?url';
4 |
5 | export { Png };
6 | export const a = '1111';
7 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-route/src/modern.runtime.ts:
--------------------------------------------------------------------------------
1 | import { defineRuntimeConfig } from '@modern-js/runtime';
2 |
3 | export default defineRuntimeConfig({
4 | plugins: [],
5 | });
6 |
--------------------------------------------------------------------------------
/tests/integration/tailwindcss/fixtures/tailwindcss-without-plugin/modern.config.ts:
--------------------------------------------------------------------------------
1 | import { applyBaseConfig } from '../../../../utils/applyBaseConfig';
2 |
3 | export default applyBaseConfig({});
4 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/apis/app/hooks/config/mock.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: mock/
3 | sidebar_position: 5
4 | ---
5 | # mock/
6 |
7 | 当项目目录下存在 `config/mock/index.js` 时,Modern.js 在开发环节将自动开启 Mock 服务。
8 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/package-manager.mdx:
--------------------------------------------------------------------------------
1 | ### packageManager
2 |
3 | 问题:请选择包管理工具
4 |
5 | 选项:
6 |
7 | - pnpm -- pnpm
8 |
9 | - Yarn -- yarn
10 |
11 | - npm -- npm
12 |
--------------------------------------------------------------------------------
/packages/generator/generators/base-generator/modern.config.js:
--------------------------------------------------------------------------------
1 | const { generatorBuildUmdConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: generatorBuildUmdConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/generator/generators/dependence-generator/modern.config.js:
--------------------------------------------------------------------------------
1 | const { generatorBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: generatorBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/generator/generators/mwa-generator/modern.config.js:
--------------------------------------------------------------------------------
1 | const { generatorBuildUmdConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: generatorBuildUmdConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/generator/generators/tailwindcss-generator/modern.config.js:
--------------------------------------------------------------------------------
1 | const { generatorBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: generatorBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/generator/generators/upgrade-generator/modern.config.js:
--------------------------------------------------------------------------------
1 | const { generatorBuildConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: generatorBuildConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/ssr/fixtures/streaming-ssr/Home.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | const Home = () => {
4 | return Home Page
;
5 | };
6 |
7 | export default Home;
8 |
--------------------------------------------------------------------------------
/packages/server/utils/tests/fixtures/es-example/server/index.js:
--------------------------------------------------------------------------------
1 | import { shared } from '@shared';
2 |
3 | const server = () => {
4 | return `${shared}-server`;
5 | };
6 |
7 | export default server;
8 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/fast-glob/package.json:
--------------------------------------------------------------------------------
1 | {"name":"fast-glob","author":{"name":"Denis Malinochkin","url":"https://mrmlnc.com"},"version":"3.2.11","license":"MIT","typings":"out/index.d.ts"}
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/strip-ansi/package.json:
--------------------------------------------------------------------------------
1 | {"name":"strip-ansi","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"version":"6.0.1","license":"MIT"}
2 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/tests/fixtures/browserlist/pkg/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test-browserlist-pkg",
3 | "browserslist": [
4 | "not IE 11",
5 | "maintained node versions"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/tests/fixtures/compat-require/esm.js:
--------------------------------------------------------------------------------
1 | Object.defineProperty(exports, '__esModule', { value: true });
2 |
3 | const _default = { name: 'esm' };
4 |
5 | exports.default = _default;
6 |
--------------------------------------------------------------------------------
/scripts/check-changeset/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@modern-js/tsconfig/base",
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist"
6 | },
7 | "include": ["src"]
8 | }
9 |
--------------------------------------------------------------------------------
/scripts/release-note/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@modern-js/tsconfig/base",
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist"
6 | },
7 | "include": ["src"]
8 | }
9 |
--------------------------------------------------------------------------------
/scripts/release-version/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@modern-js/tsconfig/base",
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist"
6 | },
7 | "include": ["src"]
8 | }
9 |
--------------------------------------------------------------------------------
/scripts/update-codesmith/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@modern-js/tsconfig/base",
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist"
6 | },
7 | "include": ["src"]
8 | }
9 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/basic/src/App.jsx:
--------------------------------------------------------------------------------
1 | import { test } from '@common/test';
2 |
3 | function App() {
4 | return Hello Builder! {test}
;
5 | }
6 |
7 | export default App;
8 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/wasm/wasm-basic/src/index.js:
--------------------------------------------------------------------------------
1 | import { _Z4facti } from './factorial.wasm';
2 |
3 | const factorial = _Z4facti;
4 |
5 | document.querySelector('#root').innerHTML = factorial(3);
6 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-builder/modern.config.ts:
--------------------------------------------------------------------------------
1 | import { appTools, defineConfig } from '@modern-js/app-tools';
2 |
3 | export default defineConfig({
4 | plugins: [appTools()],
5 | });
6 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-custom/modern.config.ts:
--------------------------------------------------------------------------------
1 | import { appTools, defineConfig } from '@modern-js/app-tools';
2 |
3 | export default defineConfig({
4 | plugins: [appTools()],
5 | });
6 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/three/routes/user/page.tsx:
--------------------------------------------------------------------------------
1 | import styles from './page.module.css';
2 |
3 | export default function Page() {
4 | return user page
;
5 | }
6 |
--------------------------------------------------------------------------------
/tests/integration/rsc-csr-routes/src/loader/routes/redirect/page.data.ts:
--------------------------------------------------------------------------------
1 | import { redirect } from '@modern-js/runtime/router';
2 |
3 | export const loader = () => {
4 | return redirect('/user');
5 | };
6 |
--------------------------------------------------------------------------------
/tests/integration/rsc-ssr-app/src/server-component-root/App.module.less:
--------------------------------------------------------------------------------
1 | .root {
2 | background-color: rgb(195, 255, 0);
3 | border: 3px red dashed;
4 | margin: 1em;
5 | padding: 1em;
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/tests/integration/rsc-ssr-routes/src/loader/routes/redirect/page.data.ts:
--------------------------------------------------------------------------------
1 | import { redirect } from '@modern-js/runtime/router';
2 |
3 | export const loader = () => {
4 | return redirect('/user');
5 | };
6 |
--------------------------------------------------------------------------------
/tests/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@modern-js/tsconfig/base",
3 | "compilerOptions": {
4 | "strictNullChecks": false,
5 | "noEmit": true
6 | },
7 | "types": ["jasmine", "jest"]
8 | }
9 |
--------------------------------------------------------------------------------
/tests/utils/jest.setup.js:
--------------------------------------------------------------------------------
1 | const { setDefaultOptions } = require('expect-puppeteer');
2 |
3 | setDefaultOptions({ timeout: 30000 });
4 |
5 | jest.setTimeout(1000 * 60 * 5);
6 |
7 | jest.retryTimes(1);
8 |
--------------------------------------------------------------------------------
/.changeset/easy-donkeys-work.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/builder': minor
3 | ---
4 |
5 | refactor: rename @modern-js/uni-builder as @modern-js/builder
6 | refactor: 将 @modern-js/uni-builder 重命名为 @modern-js/builder
7 |
--------------------------------------------------------------------------------
/packages/cli/flight-server-transform-plugin/flight_server_transform_plugin.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dext7r/modern.js/main/packages/cli/flight-server-transform-plugin/flight_server_transform_plugin.wasm
--------------------------------------------------------------------------------
/packages/cli/plugin-tailwind/tests/index.test.ts:
--------------------------------------------------------------------------------
1 | import plugin from '../src';
2 |
3 | describe('plugin-tailwind', () => {
4 | it('default', () => {
5 | expect(plugin).toBeDefined();
6 | });
7 | });
8 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/language-config.mdx:
--------------------------------------------------------------------------------
1 | ### language
2 |
3 | Question: Please select the programming language.
4 |
5 | Options:
6 |
7 | - TS -- ts
8 |
9 | - ES6+ -- js
10 |
--------------------------------------------------------------------------------
/packages/generator/generator-utils/src/utils/index.ts:
--------------------------------------------------------------------------------
1 | export * from './stripAnsi';
2 | export * from './package';
3 | export * from './getGeneratorPath';
4 | export * from './get';
5 | export * from './is';
6 |
--------------------------------------------------------------------------------
/packages/generator/generators/mwa-generator/templates/js-template/src/modern.runtime.js.handlebars:
--------------------------------------------------------------------------------
1 | import { defineRuntimeConfig } from '@modern-js/runtime';
2 |
3 | export default defineRuntimeConfig({});
4 |
--------------------------------------------------------------------------------
/packages/generator/generators/mwa-generator/templates/ts-template/src/modern.runtime.ts.handlebars:
--------------------------------------------------------------------------------
1 | import { defineRuntimeConfig } from '@modern-js/runtime';
2 |
3 | export default defineRuntimeConfig({});
4 |
--------------------------------------------------------------------------------
/packages/generator/generators/packages-generator/modern.config.js:
--------------------------------------------------------------------------------
1 | const { generatorBuildUmdConfig } = require('@scripts/build');
2 |
3 | module.exports = {
4 | buildConfig: generatorBuildUmdConfig,
5 | };
6 |
--------------------------------------------------------------------------------
/packages/server/utils/tests/fixtures/ts-example/server/index.ts:
--------------------------------------------------------------------------------
1 | import { shared } from '@shared/index';
2 |
3 | const server = () => {
4 | return `${shared}-server`;
5 | };
6 |
7 | export default server;
8 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/src/builder/shared/builderPlugins/index.ts:
--------------------------------------------------------------------------------
1 | export * from './adapterBasic';
2 | export * from './adapterHtml';
3 | export * from './adapterSSR';
4 | export * from './builderHooks';
5 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/import-lazy/package.json:
--------------------------------------------------------------------------------
1 | {"name":"import-lazy","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"version":"4.0.0","license":"MIT"}
2 |
--------------------------------------------------------------------------------
/scripts/lint-package-json/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@modern-js/tsconfig/base",
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist"
6 | },
7 | "include": ["src"]
8 | }
9 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/postcss/postcss-function-options/src/bar/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello world!
6 |
7 |
8 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/resolve-extension-prefix/src/ex.js:
--------------------------------------------------------------------------------
1 | const testEl = document.createElement('div');
2 | testEl.id = 'test-el';
3 | testEl.innerHTML = 'aaaaa';
4 | document.body.appendChild(testEl);
5 |
--------------------------------------------------------------------------------
/tests/integration/tailwindcss/fixtures/twin.macro-v2/src/App.jsx:
--------------------------------------------------------------------------------
1 | import tw from 'twin.macro';
2 |
3 | const Text = tw.p`text-gray`;
4 | const App = () => hello world;
5 |
6 | export default App;
7 |
--------------------------------------------------------------------------------
/tests/integration/tailwindcss/fixtures/twin.macro-v3/src/App.jsx:
--------------------------------------------------------------------------------
1 | import tw from 'twin.macro';
2 |
3 | const Text = tw.p`text-gray`;
4 | const App = () => hello world;
5 |
6 | export default App;
7 |
--------------------------------------------------------------------------------
/packages/cli/flight-server-transform-plugin/tests/fixture/default-actions/function-decl/input.tsx:
--------------------------------------------------------------------------------
1 | import { z } from 'zod';
2 |
3 | export default async function(){
4 | 'use server';
5 | return `default`;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/cli/plugin-data-loader/src/common/constants.ts:
--------------------------------------------------------------------------------
1 | export const LOADER_ID_PARAM = '__loader';
2 | export const DIRECT_PARAM = '__ssrDirect';
3 | export const CONTENT_TYPE_DEFERRED = 'text/modernjs-deferred';
4 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/guides/topic-detail/_meta.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "type": "dir",
4 | "name": "module-federation",
5 | "label": "module-federation",
6 | "collapsed": true
7 | }
8 | ]
9 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/apis/app/hooks/shared.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | title: shared/
3 | sidebar_position: 5
4 | ---
5 | # shared/
6 |
7 | 共享源码目录。当项目在 `api/`、`server/`、`src/` 下有公共代码时,可将这些代码放到 `shared` 目录下,而不是直接引用。
8 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/guides/topic-detail/_meta.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "type": "dir",
4 | "name": "module-federation",
5 | "label": "module-federation",
6 | "collapsed": true
7 | }
8 | ]
9 |
--------------------------------------------------------------------------------
/packages/generator/generators/tailwindcss-generator/templates/js-template/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | module.exports = {
3 | content: ['./src/**/*.{js,jsx,ts,tsx}'],
4 | };
5 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-image/.gitignore:
--------------------------------------------------------------------------------
1 | # Local
2 | .DS_Store
3 | *.local
4 | *.log*
5 |
6 | # Dist
7 | node_modules
8 | dist/
9 |
10 | # IDE
11 | .vscode/*
12 | !.vscode/extensions.json
13 | .idea
14 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/document/Title.tsx:
--------------------------------------------------------------------------------
1 | import { DOCUMENT_TITLE_PLACEHOLDER } from './constants';
2 |
3 | export function Title() {
4 | return {DOCUMENT_TITLE_PLACEHOLDER};
5 | }
6 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/router/runtime/DeferredDataScripts.tsx:
--------------------------------------------------------------------------------
1 | // used for client bundle, avoid to import node env related packages in client bundle.
2 | export default () => {
3 | return null;
4 | };
5 |
--------------------------------------------------------------------------------
/packages/server/babel-plugin-module-resolver/src/log.js:
--------------------------------------------------------------------------------
1 | // This module exists only for abstracting logging away and making testing easier
2 |
3 | export function warn(...args) {
4 | console.warn(...args);
5 | }
6 |
--------------------------------------------------------------------------------
/packages/server/plugin-polyfill/src/type.ts:
--------------------------------------------------------------------------------
1 | export type ServerPolyfill = {
2 | polyfill: {
3 | route: string;
4 | features: Record;
5 | minify: boolean;
6 | };
7 | };
8 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/moment/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "name": "@e2e/webpack-builder-test-moment",
4 | "version": "2.66.0",
5 | "dependencies": {
6 | "moment": "^2.30.1"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/output/ascii/src/index.js:
--------------------------------------------------------------------------------
1 | window.a = '你好 world!';
2 |
3 | window.b = {
4 | Д: 'A',
5 | Å: 'A',
6 | Ð: 'D',
7 | Þ: 'o',
8 | å: 'a',
9 | ð: 'd',
10 | þ: 'o',
11 | };
12 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/basic/src/pre.js:
--------------------------------------------------------------------------------
1 | const testEl = document.createElement('div');
2 | testEl.id = 'test-el';
3 | testEl.innerHTML = 'aaaaa';
4 | document.body.appendChild(testEl);
5 | window.aa = 1;
6 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/module-scopes/src/App.jsx:
--------------------------------------------------------------------------------
1 | import { test } from '../common/test';
2 |
3 | function App() {
4 | return Hello Builder! {test}
;
5 | }
6 |
7 | export default App;
8 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/source/resolve-extension-prefix/src/ex.web.js:
--------------------------------------------------------------------------------
1 | const testEl = document.createElement('div');
2 | testEl.id = 'test-el';
3 | testEl.innerHTML = 'web';
4 | document.body.appendChild(testEl);
5 |
--------------------------------------------------------------------------------
/tests/integration/custom-template/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello World
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/tests/integration/disable-html/modern.config.ts:
--------------------------------------------------------------------------------
1 | import { applyBaseConfig } from '../../utils/applyBaseConfig';
2 |
3 | export default applyBaseConfig({
4 | tools: {
5 | htmlPlugin: false,
6 | },
7 | });
8 |
--------------------------------------------------------------------------------
/tests/integration/entries/fixtures/app-route/src/routes/page.tsx:
--------------------------------------------------------------------------------
1 | const Page = () => {
2 | return (
3 |
6 | );
7 | };
8 |
9 | export default Page;
10 |
--------------------------------------------------------------------------------
/tests/integration/ssr/tests/__snapshots__/base-json.test.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Traditional SSR in json data error thrown in client navigation 1`] = `"error occurs"`;
4 |
--------------------------------------------------------------------------------
/tests/integration/tailwindcss/fixtures/tailwindcss-v3-js-config-with-postcss-config/tailwind.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | theme: {
3 | colors: {
4 | 'red-500': '#1fb6ff',
5 | },
6 | },
7 | };
8 |
--------------------------------------------------------------------------------
/.changeset/brave-years-jump.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/runtime': patch
3 | '@modern-js/server-core': patch
4 | ---
5 |
6 | feat: support enableHandleWeb for csr + rsc projects
7 | feat: 为 CSR 和 RSC 项目支持 enableHandleWeb
8 |
--------------------------------------------------------------------------------
/packages/cli/plugin-tailwind/src/types.ts:
--------------------------------------------------------------------------------
1 | export type TailwindConfig = Record;
2 |
3 | export type ExtraTailwindConfig =
4 | | TailwindConfig
5 | | ((options: TailwindConfig) => TailwindConfig | void);
6 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/init-rspack-app.mdx:
--------------------------------------------------------------------------------
1 | ```bash
2 | $ npx @modern-js/create@latest myapp
3 | ? Please select the programming language: TS
4 | ? Please select the package manager: pnpm
5 | ```
6 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/rsc/client.ts:
--------------------------------------------------------------------------------
1 | export * from '@modern-js/render/client';
2 | export const isRedirectResponse = (res: Response) => {
3 | return res.headers.get('X-Modernjs-Redirect') != null;
4 | };
5 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/tests/commands/dev.test.ts:
--------------------------------------------------------------------------------
1 | import { dev } from '../../src/commands/dev';
2 |
3 | describe('command', () => {
4 | test('dev', () => {
5 | expect(dev).toBeDefined();
6 | });
7 | });
8 |
--------------------------------------------------------------------------------
/packages/toolkit/node-bundle-require/tests/fixture/test-package-esm-with-cjs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "test-package-esm-with-cjs",
3 | "type": "module",
4 | "main": "index.cjs",
5 | "module": "index.mjs"
6 | }
7 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/glob/package.json:
--------------------------------------------------------------------------------
1 | {"name":"glob","author":"Isaac Z. Schlueter (http://blog.izs.me/)","version":"7.2.0","funding":{"url":"https://github.com/sponsors/isaacs"},"license":"ISC"}
2 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/html/minify/src/App.tsx:
--------------------------------------------------------------------------------
1 | import './App.css';
2 |
3 | const App = () => (
4 |
5 | Hello Builder!
6 |
7 | );
8 |
9 | export default App;
10 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/inline-chunk/src/another.js:
--------------------------------------------------------------------------------
1 | import './style.css';
2 |
3 | import(
4 | /* webpackChunkName: "foo" */
5 | './foo'
6 | ).then(({ foo }) => {
7 | window.answer = `another ${foo()}`;
8 | });
9 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/performance/removeConsole/src/index.js:
--------------------------------------------------------------------------------
1 | console.debug('test-console-debug');
2 | console.log('test-console-log');
3 | console.warn('test-console-warn');
4 | console.error('test-console-error');
5 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/postcss/postcss-function-options/src/foo/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hello world!
6 |
7 |
8 |
--------------------------------------------------------------------------------
/tests/integration/alias-set/src/App.tsx:
--------------------------------------------------------------------------------
1 | import test from '@common/constants';
2 | import '@resolve-alias';
3 |
4 | function App() {
5 | return Hello Modern.js! {test}
;
6 | }
7 |
8 | export default App;
9 |
--------------------------------------------------------------------------------
/tests/integration/clean-dist-path/modern.config.ts:
--------------------------------------------------------------------------------
1 | import { applyBaseConfig } from '../../utils/applyBaseConfig';
2 |
3 | export default applyBaseConfig({
4 | output: {
5 | cleanDistPath: false,
6 | },
7 | });
8 |
--------------------------------------------------------------------------------
/tests/integration/routes/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 |
--------------------------------------------------------------------------------
/tests/integration/rsc-csr-app/src/components/DynamicMessage.module.css:
--------------------------------------------------------------------------------
1 | .dynamic-message {
2 | margin: 16px 0;
3 | padding: 16px;
4 | background-color: #ffffff;
5 | border-radius: 4px;
6 | color: #333333;
7 | }
8 |
--------------------------------------------------------------------------------
/tests/integration/runtime-plugin/fixtures/custom-runtime-plugin/modern.config.ts:
--------------------------------------------------------------------------------
1 | import { appTools, defineConfig } from '@modern-js/app-tools';
2 |
3 | export default defineConfig({
4 | plugins: [appTools()],
5 | });
6 |
--------------------------------------------------------------------------------
/.changeset/wide-humans-tease.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/prod-server': patch
3 | '@modern-js/plugin-bff': patch
4 | '@modern-js/server-core': patch
5 | ---
6 |
7 | feat: server config support onError
8 | feat: 自定义 server 支持错误处理
9 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: Ask a question
4 | url: https://github.com/web-infra-dev/modern.js/discussions
5 | about: Ask a question about Modern.js
6 |
--------------------------------------------------------------------------------
/packages/generator/generator-common/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './locale';
2 | export * from './common';
3 | export * from './newAction';
4 | export * from './mwa';
5 | export * from './expand';
6 | export * from './base';
7 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/config.ts:
--------------------------------------------------------------------------------
1 | import type { RouterConfig } from './router/internal';
2 |
3 | export interface RuntimeUserConfig {
4 | runtime?: {
5 | router?: boolean | RouterConfig;
6 | };
7 | }
8 |
--------------------------------------------------------------------------------
/packages/server/plugin-polyfill/src/const.ts:
--------------------------------------------------------------------------------
1 | export const defaultPolyfill = '/__polyfill__';
2 |
3 | export const getDefaultFeatures = (): Record => ({
4 | es6: { flags: ['gated'] },
5 | });
6 |
--------------------------------------------------------------------------------
/tests/integration/bff-hono/src/routes/layout.tsx:
--------------------------------------------------------------------------------
1 | import { Outlet } from '@modern-js/runtime/router';
2 |
3 | export default () => {
4 | return (
5 |
6 |
7 |
8 | );
9 | };
10 |
--------------------------------------------------------------------------------
/tests/integration/ssg/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "name": "ssg",
4 | "version": "2.66.0",
5 | "devDependencies": {
6 | "@types/jest": "^29.5.14",
7 | "@types/node": "^20"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/.changeset/kind-buses-stick.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/runtime-utils': patch
3 | ---
4 |
5 | feat: support configure storage container and unstable_shouldCache for cache
6 | feat: 为 cache 函数支持自定义存储 container 和 unstable_shouldCache
7 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Modern.js Contributing Guide
2 |
3 | - [English Version](./packages/document/main-doc/docs/en/community/contributing-guide.mdx)
4 | - [中文版](./packages/document/main-doc/docs/zh/community/contributing-guide.mdx)
5 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/zh/components/tech-stack-node-framework.mdx:
--------------------------------------------------------------------------------
1 | Modern.js Server 和 BFF 是以 [Hono.js](https://hono.dev/) 作为运行时框架,可以基于 Hono.js 生态扩展 Server,请参考 [自定义 Web Server](/guides/advanced-features/web-server.html)。
2 |
--------------------------------------------------------------------------------
/packages/generator/generator-utils/src/locale/en.ts:
--------------------------------------------------------------------------------
1 | export const EN_LOCALE = {
2 | packageName: { exit: 'package name `{value}` is already exists' },
3 | packagePath: { exit: 'package path {value} is already exists' },
4 | };
5 |
--------------------------------------------------------------------------------
/packages/generator/new-action/tests/index.test.ts:
--------------------------------------------------------------------------------
1 | import { MWANewAction } from '../src';
2 |
3 | describe('generator-new-action', () => {
4 | it('default', () => {
5 | expect(MWANewAction).toBeDefined();
6 | });
7 | });
8 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/tests/router/fixtures/nested-routes/user/$.data.ts:
--------------------------------------------------------------------------------
1 | const loader = () => {};
2 |
3 | // biome-ignore lint/style/noVar:
4 | export var action = () => {};
5 |
6 | export { loader };
7 |
--------------------------------------------------------------------------------
/packages/toolkit/utils/compiled/lodash/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * We just prebundled the `@types/lodash`
3 | * The `lodash` is not prebundled because lots of packages will depend on it.
4 | */
5 | module.exports = require('lodash');
6 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/postcss/postcss-config-file/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Hello world!
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/tests/e2e/builder/cases/sri/src/App.jsx:
--------------------------------------------------------------------------------
1 | import './App.css';
2 |
3 | const App = () => (
4 |
7 | );
8 |
9 | export default App;
10 |
--------------------------------------------------------------------------------
/tests/integration/app-document/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 |
--------------------------------------------------------------------------------
/tests/integration/app-document/src/sub/routes/layout.tsx:
--------------------------------------------------------------------------------
1 | import { Outlet } from '@modern-js/runtime/router';
2 |
3 | export default () => {
4 | return (
5 | <>
6 |
7 | >
8 | );
9 | };
10 |
--------------------------------------------------------------------------------
/tests/integration/copy-assets/modern.config.ts:
--------------------------------------------------------------------------------
1 | import { applyBaseConfig } from '../../utils/applyBaseConfig';
2 |
3 | export default applyBaseConfig({
4 | output: {
5 | assetPrefix: 'https://demo.com/',
6 | },
7 | });
8 |
--------------------------------------------------------------------------------
/tests/integration/deploy-csr/src/one/routes/layout.tsx:
--------------------------------------------------------------------------------
1 | import { Outlet } from '@modern-js/runtime/router';
2 |
3 | export default () => {
4 | return (
5 |
6 |
7 |
8 | );
9 | };
10 |
--------------------------------------------------------------------------------
/tests/integration/deploy-csr/src/two/routes/layout.tsx:
--------------------------------------------------------------------------------
1 | import { Outlet } from '@modern-js/runtime/router';
2 |
3 | export default () => {
4 | return (
5 |
6 |
7 |
8 | );
9 | };
10 |
--------------------------------------------------------------------------------
/tests/integration/rsc-csr-app/src/components/Suspended.tsx:
--------------------------------------------------------------------------------
1 | async function Suspended() {
2 | await new Promise(resolve => setTimeout(resolve, 1500));
3 | return Suspended
;
4 | }
5 |
6 | export default Suspended;
7 |
--------------------------------------------------------------------------------
/tests/integration/ssg/fixtures/simple/src/App.jsx:
--------------------------------------------------------------------------------
1 | const App = () => {
2 | return (
3 |
4 | Hello, Modern.js
5 |
6 | );
7 | };
8 |
9 | export default App;
10 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/base/src/modern-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 |
--------------------------------------------------------------------------------
/tests/integration/ssr/fixtures/scriptLoading/modern.config.ts:
--------------------------------------------------------------------------------
1 | import { applyBaseConfig } from '../../../../utils/applyBaseConfig';
2 |
3 | export default applyBaseConfig({
4 | runtime: {
5 | router: true,
6 | },
7 | });
8 |
--------------------------------------------------------------------------------
/.changeset/curvy-kids-knock.md:
--------------------------------------------------------------------------------
1 | ---
2 | '@modern-js/plugin-styled-components': patch
3 | '@modern-js/runtime': patch
4 | '@modern-js/plugin': patch
5 | ---
6 |
7 | feat: add plugin-styled-components
8 | feat: 新增 styled-components 插件
9 |
--------------------------------------------------------------------------------
/packages/cli/plugin-bff/src/runtime/create-request/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | configure,
3 | createRequest,
4 | createUploader,
5 | } from '@modern-js/create-request';
6 |
7 | export { configure, createRequest, createUploader };
8 |
--------------------------------------------------------------------------------
/packages/document/main-doc/docs/en/components/enable-bff-caution.mdx:
--------------------------------------------------------------------------------
1 | :::caution
2 | Please use the [new command](/apis/app/commands#modern-new) in the root directory of the current project to enable BFF functionality first.
3 | :::
4 |
--------------------------------------------------------------------------------
/packages/generator/generators/tailwindcss-generator/templates/ts-template/tailwind.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from 'tailwindcss';
2 |
3 | export default {
4 | content: ['./src/**/*.{js,jsx,ts,tsx}'],
5 | } satisfies Config;
6 |
--------------------------------------------------------------------------------
/packages/runtime/plugin-runtime/src/document/Links.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { DOCUMENT_LINKS_PLACEHOLDER } from './constants';
3 |
4 | export function Links() {
5 | return <>{DOCUMENT_LINKS_PLACEHOLDER}>;
6 | }
7 |
--------------------------------------------------------------------------------
/packages/server/bff-core/tests/fixtures/function/[id]/origin/bar.ts:
--------------------------------------------------------------------------------
1 | export const get = (id: string) => ({ id });
2 |
3 | export const post = (id: string, { data }: { data: Record }) => ({
4 | id,
5 | data,
6 | });
7 |
--------------------------------------------------------------------------------
/packages/server/bff-core/tests/fixtures/function/[id]/origin/baz.ts:
--------------------------------------------------------------------------------
1 | export const get = (id: string) => ({ id });
2 |
3 | export const post = (id: string, { data }: { data: Record }) => ({
4 | id,
5 | data,
6 | });
7 |
--------------------------------------------------------------------------------
/packages/server/bff-core/tests/fixtures/function/[id]/origin/foo.ts:
--------------------------------------------------------------------------------
1 | export const get = (id: string) => ({ id });
2 |
3 | export const post = (id: string, { data }: { data: Record }) => ({
4 | id,
5 | data,
6 | });
7 |
--------------------------------------------------------------------------------
/packages/server/core/src/context.ts:
--------------------------------------------------------------------------------
1 | import type { Context } from 'hono';
2 | import { createStorage } from './utils/storage';
3 |
4 | const { run, useHonoContext } = createStorage();
5 |
6 | export { run, useHonoContext };
7 |
--------------------------------------------------------------------------------
/packages/server/server/tests/fixtures/pure/test-dist/bundles/test.js:
--------------------------------------------------------------------------------
1 | const { SERVER_RENDER_FUNCTION_NAME } = require('@modern-js/utils');
2 |
3 | module.exports = {
4 | [SERVER_RENDER_FUNCTION_NAME]: () => 'test
',
5 | };
6 |
--------------------------------------------------------------------------------
/packages/solutions/app-tools/src/plugins/analyze/constants.ts:
--------------------------------------------------------------------------------
1 | export const ENTRY_FILE_NAME = 'entry';
2 |
3 | export const HTML_PARTIALS_FOLDER = 'html';
4 |
5 | export const HTML_PARTIALS_EXTENSIONS = ['.htm', '.html', '.ejs'];
6 |
--------------------------------------------------------------------------------
/packages/toolkit/plugin/src/server/run/index.ts:
--------------------------------------------------------------------------------
1 | import { createServer } from './create';
2 |
3 | export const server = createServer();
4 |
5 | export { createServer };
6 |
7 | export type { ServerCreateOptions } from './types';
8 |
--------------------------------------------------------------------------------