@modern-js/main-doc 2.2.0 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.turbo/turbo-build.log +1 -1
- package/en/components/global-proxy-config.mdx +2 -2
- package/en/components/init-app.mdx +1 -1
- package/en/configure/app/auto-load-plugin.mdx +2 -2
- package/en/configure/app/bff/prefix.mdx +2 -2
- package/en/configure/app/bff/proxy.mdx +2 -2
- package/en/configure/app/builder-plugins.mdx +2 -2
- package/en/configure/app/deploy/microFrontend.mdx +6 -6
- package/en/configure/app/dev/asset-prefix.mdx +4 -3
- package/en/configure/app/dev/hmr.mdx +4 -3
- package/en/configure/app/dev/https.mdx +4 -3
- package/en/configure/app/dev/port.mdx +4 -3
- package/en/configure/app/dev/progress-bar.mdx +4 -3
- package/en/configure/app/dev/start-url.mdx +4 -3
- package/en/configure/app/experiments/lazy-compilation.mdx +4 -3
- package/en/configure/app/html/app-icon.mdx +4 -3
- package/en/configure/app/html/crossorigin.mdx +4 -3
- package/en/configure/app/html/disable-html-folder.mdx +4 -3
- package/en/configure/app/html/favicon-by-entries.mdx +4 -3
- package/en/configure/app/html/favicon.mdx +4 -3
- package/en/configure/app/html/inject-by-entries.mdx +4 -3
- package/en/configure/app/html/inject.mdx +4 -3
- package/en/configure/app/html/meta-by-entries.mdx +4 -3
- package/en/configure/app/html/meta.mdx +4 -3
- package/en/configure/app/html/mount-id.mdx +4 -3
- package/en/configure/app/html/tags-by-entries.mdx +4 -3
- package/en/configure/app/html/tags.mdx +4 -3
- package/en/configure/app/html/template-by-entries.mdx +4 -3
- package/en/configure/app/html/template-parameters-by-entries.mdx +4 -3
- package/en/configure/app/html/template-parameters.mdx +4 -3
- package/en/configure/app/html/template.mdx +4 -3
- package/en/configure/app/html/title-by-entries.mdx +4 -3
- package/en/configure/app/html/title.mdx +4 -3
- package/en/configure/app/output/asset-prefix.mdx +4 -3
- package/en/configure/app/output/assets-retry.mdx +4 -3
- package/en/configure/app/output/charset.mdx +4 -3
- package/en/configure/app/output/clean-dist-path.mdx +4 -3
- package/en/configure/app/output/convert-to-rem.mdx +4 -3
- package/en/configure/app/output/copy.mdx +4 -3
- package/en/configure/app/output/css-module-local-ident-name.mdx +4 -3
- package/en/configure/app/output/data-uri-limit.mdx +4 -3
- package/en/configure/app/output/disable-css-extract.mdx +4 -3
- package/en/configure/app/output/disable-css-module-extension.mdx +4 -3
- package/en/configure/app/output/disable-filename-hash.mdx +4 -3
- package/en/configure/app/output/disable-inline-runtime-chunk.mdx +4 -3
- package/en/configure/app/output/disable-minimize.mdx +4 -3
- package/en/configure/app/output/disable-node-polyfill.mdx +2 -2
- package/en/configure/app/output/disable-source-map.mdx +4 -3
- package/en/configure/app/output/disable-ts-checker.mdx +4 -3
- package/en/configure/app/output/dist-path.mdx +4 -3
- package/en/configure/app/output/enable-asset-fallback.mdx +4 -3
- package/en/configure/app/output/enable-asset-manifest.mdx +4 -3
- package/en/configure/app/output/enable-css-module-tsdeclaration.mdx +4 -3
- package/en/configure/app/output/enable-inline-scripts.mdx +4 -3
- package/en/configure/app/output/enable-inline-styles.mdx +4 -3
- package/en/configure/app/output/enable-latest-decorators.mdx +4 -3
- package/en/configure/app/output/externals.mdx +4 -3
- package/en/configure/app/output/filename.mdx +4 -3
- package/en/configure/app/output/legal-comments.mdx +4 -3
- package/en/configure/app/output/override-browserslist.mdx +4 -3
- package/en/configure/app/output/polyfill.mdx +4 -3
- package/en/configure/app/output/ssg.mdx +2 -2
- package/en/configure/app/output/svg-default-export.mdx +4 -3
- package/en/configure/app/performance/build-cache.mdx +4 -3
- package/en/configure/app/performance/bundle-analyze.mdx +4 -3
- package/en/configure/app/performance/chunk-split.mdx +4 -3
- package/en/configure/app/performance/print-file-size.mdx +4 -3
- package/en/configure/app/performance/profile.mdx +4 -3
- package/en/configure/app/performance/remove-console.mdx +4 -3
- package/en/configure/app/performance/remove-moment-locale.mdx +4 -3
- package/en/configure/app/plugins.mdx +2 -2
- package/en/configure/app/runtime/intro.mdx +2 -2
- package/en/configure/app/runtime/master-app.mdx +1 -2
- package/en/configure/app/runtime/router.mdx +6 -6
- package/en/configure/app/runtime/state.mdx +14 -14
- package/en/configure/app/security/check-syntax.mdx +13 -0
- package/en/configure/app/security/sri.mdx +4 -3
- package/en/configure/app/server/base-url.mdx +2 -2
- package/en/configure/app/server/enable-framework-ext.mdx +2 -2
- package/en/configure/app/server/port.mdx +2 -2
- package/en/configure/app/server/public-routes.mdx +2 -2
- package/en/configure/app/server/routes.mdx +2 -2
- package/en/configure/app/server/ssr-by-entries.mdx +2 -2
- package/en/configure/app/server/ssr.mdx +2 -2
- package/en/configure/app/source/alias.mdx +4 -3
- package/en/configure/app/source/compile-js-data-uri.mdx +4 -3
- package/en/configure/app/source/config-dir.mdx +2 -2
- package/en/configure/app/source/define.mdx +4 -3
- package/en/configure/app/source/design-system.mdx +2 -2
- package/en/configure/app/source/disable-default-entries.mdx +2 -2
- package/en/configure/app/source/disable-entry-dirs.mdx +2 -2
- package/en/configure/app/source/enable-async-entry.mdx +2 -2
- package/en/configure/app/source/entries-dir.mdx +2 -2
- package/en/configure/app/source/entries.mdx +2 -2
- package/en/configure/app/source/exclude.mdx +4 -3
- package/en/configure/app/source/global-vars.mdx +4 -3
- package/en/configure/app/source/include.mdx +4 -3
- package/en/configure/app/source/module-scopes.mdx +4 -3
- package/en/configure/app/source/pre-entry.mdx +4 -3
- package/en/configure/app/source/resolve-extension-prefix.mdx +4 -3
- package/en/configure/app/source/resolve-main-fields.mdx +4 -3
- package/en/configure/app/testing/transformer.mdx +2 -2
- package/en/configure/app/tools/autoprefixer.mdx +4 -3
- package/en/configure/app/tools/babel.mdx +4 -3
- package/en/configure/app/tools/css-extract.mdx +4 -3
- package/en/configure/app/tools/css-loader.mdx +4 -3
- package/en/configure/app/tools/dev-server.mdx +4 -3
- package/en/configure/app/tools/esbuild.mdx +2 -2
- package/en/configure/app/tools/html-plugin.mdx +4 -3
- package/en/configure/app/tools/inspector.mdx +4 -3
- package/en/configure/app/tools/jest.mdx +2 -2
- package/en/configure/app/tools/less.mdx +4 -3
- package/en/configure/app/tools/minify-css.mdx +4 -3
- package/en/configure/app/tools/postcss.mdx +4 -3
- package/en/configure/app/tools/pug.mdx +4 -3
- package/en/configure/app/tools/sass.mdx +4 -3
- package/en/configure/app/tools/style-loader.mdx +4 -3
- package/en/configure/app/tools/styled-components.mdx +4 -3
- package/en/configure/app/tools/swc.mdx +2 -2
- package/en/configure/app/tools/tailwindcss.mdx +8 -16
- package/en/configure/app/tools/terser.mdx +4 -3
- package/en/configure/app/tools/ts-checker.mdx +4 -3
- package/en/configure/app/tools/ts-loader.mdx +4 -3
- package/en/configure/app/tools/webpack-chain.mdx +4 -3
- package/en/configure/app/tools/webpack.mdx +4 -3
- package/en/configure/app/usage.mdx +117 -8
- package/en/guides/advanced-features/_category_.json +5 -0
- package/en/guides/advanced-features/ssr.mdx +2 -2
- package/en/guides/basic-features/_category_.json +5 -0
- package/en/guides/basic-features/builder.mdx +3 -3
- package/en/guides/basic-features/routes.mdx +28 -0
- package/en/guides/concept/_category_.json +5 -0
- package/en/guides/get-started/_category_.json +5 -0
- package/en/guides/topic-detail/generator/config/{mwa.mdx → app.mdx} +1 -1
- package/en/guides/topic-detail/generator/config/common.mdx +12 -12
- package/en/guides/topic-detail/generator/plugin/api/new/createElement.mdx +1 -1
- package/en/guides/topic-detail/generator/plugin/api/new/enableFunc.mdx +1 -1
- package/en/guides/topic-detail/generator/plugin/api/new/introduce.mdx +1 -1
- package/en/guides/topic-detail/generator/plugin/develop.mdx +2 -2
- package/package.json +3 -3
- package/scripts/config.ts +6 -5
- package/scripts/summary.en.json +1 -1
- package/scripts/summary.zh.json +1 -1
- package/zh/apis/app/commands/test.mdx +1 -1
- package/zh/apis/app/hooks/api/functions/api.mdx +2 -2
- package/zh/apis/app/hooks/api/test.mdx +1 -1
- package/zh/apis/app/hooks/config/storybook.mdx +1 -1
- package/zh/apis/app/hooks/config/upload.mdx +1 -1
- package/zh/apis/app/hooks/server/test.mdx +1 -1
- package/zh/apis/app/hooks/src/stories.mdx +1 -1
- package/zh/apis/app/hooks/src/test.mdx +1 -1
- package/zh/apis/app/runtime/testing/cleanup.mdx +1 -1
- package/zh/apis/monorepo/commands/bump.mdx +1 -1
- package/zh/apis/monorepo/commands/change.mdx +1 -1
- package/zh/apis/monorepo/hooks/apps.mdx +1 -1
- package/zh/apis/monorepo/hooks/examples.mdx +1 -1
- package/zh/apis/monorepo/hooks/features.mdx +1 -1
- package/zh/apis/monorepo/hooks/packages.mdx +1 -1
- package/zh/components/custom-router-micro-frontend.mdx +40 -0
- package/zh/components/enable-micro-frontend.mdx +12 -2
- package/zh/components/global-proxy-config.mdx +3 -3
- package/zh/components/micro-runtime-config.mdx +9 -10
- package/zh/configure/app/auto-load-plugin.mdx +2 -2
- package/zh/configure/app/bff/prefix.mdx +2 -2
- package/zh/configure/app/bff/proxy.mdx +3 -3
- package/zh/configure/app/builder-plugins.mdx +2 -2
- package/zh/configure/app/deploy/microFrontend.mdx +6 -6
- package/zh/configure/app/dev/asset-prefix.mdx +4 -3
- package/zh/configure/app/dev/hmr.mdx +4 -3
- package/zh/configure/app/dev/https.mdx +4 -3
- package/zh/configure/app/dev/port.mdx +4 -3
- package/zh/configure/app/dev/progress-bar.mdx +4 -3
- package/zh/configure/app/dev/start-url.mdx +4 -3
- package/zh/configure/app/experiments/lazy-compilation.mdx +4 -3
- package/zh/configure/app/html/app-icon.mdx +4 -3
- package/zh/configure/app/html/crossorigin.mdx +4 -3
- package/zh/configure/app/html/disable-html-folder.mdx +4 -3
- package/zh/configure/app/html/favicon-by-entries.mdx +4 -3
- package/zh/configure/app/html/favicon.mdx +4 -3
- package/zh/configure/app/html/inject-by-entries.mdx +4 -3
- package/zh/configure/app/html/inject.mdx +4 -3
- package/zh/configure/app/html/meta-by-entries.mdx +4 -3
- package/zh/configure/app/html/meta.mdx +4 -3
- package/zh/configure/app/html/mount-id.mdx +4 -3
- package/zh/configure/app/html/tags-by-entries.mdx +4 -3
- package/zh/configure/app/html/tags.mdx +4 -3
- package/zh/configure/app/html/template-by-entries.mdx +4 -3
- package/zh/configure/app/html/template-parameters-by-entries.mdx +4 -3
- package/zh/configure/app/html/template-parameters.mdx +4 -3
- package/zh/configure/app/html/template.mdx +4 -3
- package/zh/configure/app/html/title-by-entries.mdx +4 -3
- package/zh/configure/app/html/title.mdx +4 -3
- package/zh/configure/app/output/asset-prefix.mdx +4 -3
- package/zh/configure/app/output/assets-retry.mdx +4 -3
- package/zh/configure/app/output/charset.mdx +4 -3
- package/zh/configure/app/output/clean-dist-path.mdx +4 -3
- package/zh/configure/app/output/convert-to-rem.mdx +4 -3
- package/zh/configure/app/output/copy.mdx +4 -3
- package/zh/configure/app/output/css-module-local-ident-name.mdx +4 -3
- package/zh/configure/app/output/data-uri-limit.mdx +4 -3
- package/zh/configure/app/output/disable-css-extract.mdx +4 -3
- package/zh/configure/app/output/disable-css-module-extension.mdx +4 -3
- package/zh/configure/app/output/disable-filename-hash.mdx +4 -3
- package/zh/configure/app/output/disable-inline-runtime-chunk.mdx +4 -3
- package/zh/configure/app/output/disable-minimize.mdx +4 -3
- package/zh/configure/app/output/disable-node-polyfill.mdx +2 -2
- package/zh/configure/app/output/disable-source-map.mdx +4 -3
- package/zh/configure/app/output/disable-ts-checker.mdx +4 -3
- package/zh/configure/app/output/dist-path.mdx +4 -3
- package/zh/configure/app/output/enable-asset-fallback.mdx +4 -3
- package/zh/configure/app/output/enable-asset-manifest.mdx +4 -3
- package/zh/configure/app/output/enable-css-module-tsdeclaration.mdx +4 -3
- package/zh/configure/app/output/enable-inline-scripts.mdx +4 -3
- package/zh/configure/app/output/enable-inline-styles.mdx +4 -3
- package/zh/configure/app/output/enable-latest-decorators.mdx +4 -3
- package/zh/configure/app/output/externals.mdx +4 -3
- package/zh/configure/app/output/filename.mdx +4 -3
- package/zh/configure/app/output/legal-comments.mdx +4 -3
- package/zh/configure/app/output/override-browserslist.mdx +4 -3
- package/zh/configure/app/output/polyfill.mdx +4 -3
- package/zh/configure/app/output/ssg.mdx +2 -2
- package/zh/configure/app/output/svg-default-export.mdx +4 -3
- package/zh/configure/app/performance/build-cache.mdx +4 -3
- package/zh/configure/app/performance/bundle-analyze.mdx +4 -3
- package/zh/configure/app/performance/chunk-split.mdx +4 -3
- package/zh/configure/app/performance/print-file-size.mdx +4 -3
- package/zh/configure/app/performance/profile.mdx +4 -3
- package/zh/configure/app/performance/remove-console.mdx +4 -3
- package/zh/configure/app/performance/remove-moment-locale.mdx +4 -3
- package/zh/configure/app/plugins.mdx +2 -2
- package/zh/configure/app/runtime/intro.mdx +3 -3
- package/zh/configure/app/runtime/master-app.mdx +1 -1
- package/zh/configure/app/runtime/router.mdx +6 -6
- package/zh/configure/app/runtime/state.mdx +14 -14
- package/zh/configure/app/security/check-syntax.mdx +13 -0
- package/zh/configure/app/security/sri.mdx +4 -3
- package/zh/configure/app/server/base-url.mdx +2 -2
- package/zh/configure/app/server/enable-framework-ext.mdx +2 -2
- package/zh/configure/app/server/port.mdx +2 -2
- package/zh/configure/app/server/public-routes.mdx +2 -2
- package/zh/configure/app/server/routes.mdx +2 -2
- package/zh/configure/app/server/ssr-by-entries.mdx +3 -3
- package/zh/configure/app/server/ssr.mdx +2 -2
- package/zh/configure/app/source/alias.mdx +4 -3
- package/zh/configure/app/source/compile-js-data-uri.mdx +4 -3
- package/zh/configure/app/source/config-dir.mdx +2 -2
- package/zh/configure/app/source/define.mdx +4 -3
- package/zh/configure/app/source/design-system.mdx +2 -2
- package/zh/configure/app/source/disable-default-entries.mdx +2 -2
- package/zh/configure/app/source/disable-entry-dirs.mdx +2 -2
- package/zh/configure/app/source/enable-async-entry.mdx +2 -2
- package/zh/configure/app/source/entries-dir.mdx +2 -2
- package/zh/configure/app/source/entries.mdx +2 -2
- package/zh/configure/app/source/exclude.mdx +4 -3
- package/zh/configure/app/source/global-vars.mdx +4 -3
- package/zh/configure/app/source/include.mdx +4 -3
- package/zh/configure/app/source/module-scopes.mdx +4 -3
- package/zh/configure/app/source/pre-entry.mdx +4 -3
- package/zh/configure/app/source/resolve-extension-prefix.mdx +4 -3
- package/zh/configure/app/source/resolve-main-fields.mdx +4 -3
- package/zh/configure/app/testing/transformer.mdx +2 -2
- package/zh/configure/app/tools/autoprefixer.mdx +4 -3
- package/zh/configure/app/tools/babel.mdx +4 -3
- package/zh/configure/app/tools/css-extract.mdx +4 -3
- package/zh/configure/app/tools/css-loader.mdx +4 -3
- package/zh/configure/app/tools/dev-server.mdx +4 -3
- package/zh/configure/app/tools/esbuild.mdx +2 -2
- package/zh/configure/app/tools/html-plugin.mdx +4 -3
- package/zh/configure/app/tools/inspector.mdx +4 -3
- package/zh/configure/app/tools/jest.mdx +2 -2
- package/zh/configure/app/tools/less.mdx +4 -3
- package/zh/configure/app/tools/minify-css.mdx +4 -3
- package/zh/configure/app/tools/postcss.mdx +4 -3
- package/zh/configure/app/tools/pug.mdx +4 -3
- package/zh/configure/app/tools/sass.mdx +4 -3
- package/zh/configure/app/tools/style-loader.mdx +4 -3
- package/zh/configure/app/tools/styled-components.mdx +4 -3
- package/zh/configure/app/tools/swc.mdx +2 -2
- package/zh/configure/app/tools/tailwindcss.mdx +10 -16
- package/zh/configure/app/tools/terser.mdx +4 -3
- package/zh/configure/app/tools/ts-checker.mdx +4 -3
- package/zh/configure/app/tools/ts-loader.mdx +4 -3
- package/zh/configure/app/tools/webpack-chain.mdx +4 -3
- package/zh/configure/app/tools/webpack.mdx +4 -3
- package/zh/configure/app/usage.mdx +117 -8
- package/zh/guides/advanced-features/bff/function.mdx +3 -3
- package/zh/guides/advanced-features/code-split.mdx +1 -1
- package/zh/guides/advanced-features/compatibility.mdx +1 -1
- package/zh/guides/advanced-features/eslint.mdx +3 -3
- package/zh/guides/advanced-features/ssr.mdx +3 -3
- package/zh/guides/basic-features/alias.mdx +1 -1
- package/zh/guides/basic-features/builder.mdx +2 -2
- package/zh/guides/basic-features/css/postcss.mdx +1 -1
- package/zh/guides/basic-features/html.mdx +1 -1
- package/zh/guides/basic-features/routes.mdx +28 -1
- package/zh/guides/topic-detail/framework-plugin/hook.mdx +1 -1
- package/zh/guides/topic-detail/generator/config/{mwa.mdx → app.mdx} +1 -1
- package/zh/guides/topic-detail/generator/config/common.mdx +12 -12
- package/zh/guides/topic-detail/generator/plugin/api/input/addInputBefore.mdx +1 -1
- package/zh/guides/topic-detail/generator/plugin/api/new/createElement.mdx +1 -1
- package/zh/guides/topic-detail/generator/plugin/api/new/enableFunc.mdx +1 -1
- package/zh/guides/topic-detail/generator/plugin/api/new/introduce.mdx +2 -2
- package/zh/guides/topic-detail/generator/plugin/develop.mdx +3 -3
- package/zh/guides/topic-detail/micro-frontend/c02-development.mdx +128 -61
- package/zh/guides/topic-detail/micro-frontend/c03-main-app.mdx +71 -40
- package/zh/guides/topic-detail/micro-frontend/c05-mixed-stack.mdx +1 -1
- package/zh/guides/topic-detail/model/auto-actions.mdx +1 -1
- package/zh/guides/topic-detail/model/define-model.mdx +1 -1
- package/zh/guides/topic-detail/model/manage-effects.mdx +1 -1
- package/zh/guides/topic-detail/model/quick-start.mdx +2 -2
- package/zh/guides/topic-detail/model/test-model.mdx +1 -1
- package/zh/guides/topic-detail/model/use-model.mdx +3 -3
- package/zh/guides/topic-detail/monorepo/create-sub-project.mdx +2 -2
- package/zh/guides/topic-detail/monorepo/sub-project-interface.mdx +2 -2
- package/zh/tutorials/first-app/c02-component.mdx +1 -1
- package/zh/tutorials/first-app/c03-css.mdx +3 -3
- package/zh/tutorials/first-app/c04-routes.mdx +1 -1
- package/zh/tutorials/first-app/c06-model.mdx +1 -1
@@ -4,8 +4,8 @@ sidebar_label: enableFrameworkExt
|
|
4
4
|
|
5
5
|
# server.enableFrameworkExt
|
6
6
|
|
7
|
-
- Type
|
8
|
-
- Default
|
7
|
+
- **Type:** `boolean`
|
8
|
+
- **Default:** `false`
|
9
9
|
|
10
10
|
By default, with 【Custom Web Server](/docs/guides/advanced-features/web-server) enable, Middleware uses the syntax of the Modern.js itself.
|
11
11
|
|
@@ -4,8 +4,8 @@ sidebar_label: port
|
|
4
4
|
|
5
5
|
# server.port
|
6
6
|
|
7
|
-
- Type
|
8
|
-
- Default
|
7
|
+
- **Type:** `number`
|
8
|
+
- **Default:** `8080`
|
9
9
|
|
10
10
|
When Modern.js executes `dev`, `start` and `serve` commands, it will start with `8080` as the default port, and will automatically increment the port number when the port is occupied. You can change the port number of Server through this config:
|
11
11
|
|
@@ -4,8 +4,8 @@ sidebar_label: publicRoutes
|
|
4
4
|
|
5
5
|
# server.publicRoutes
|
6
6
|
|
7
|
-
- Type
|
8
|
-
- Default
|
7
|
+
- **Type:** `Object`
|
8
|
+
- **Default:** Automatic generation of server-level routing rules based on file conventions: One routing rule is generated per file of the application.
|
9
9
|
|
10
10
|
This configuration option only applies to server-level routing, and you can customize the access route of resources in `config/public/`.
|
11
11
|
|
@@ -4,8 +4,8 @@ sidebar_label: routes
|
|
4
4
|
|
5
5
|
# server.routes
|
6
6
|
|
7
|
-
- Type
|
8
|
-
- Default
|
7
|
+
- **Type:** `Object`
|
8
|
+
- **Default:** Automatic generation of server-level routing rules based on file conventions: One routing rule is generated per file of the application,and the default route is the same as the entry name.
|
9
9
|
|
10
10
|
This configuration option only applies to server-level routing, and can customize the service access configuration of the application entry.
|
11
11
|
|
@@ -4,8 +4,8 @@ sidebar_label: ssrByEntries
|
|
4
4
|
|
5
5
|
# server.ssrByEntries
|
6
6
|
|
7
|
-
- Type
|
8
|
-
- Default
|
7
|
+
- **Type:** `Object`
|
8
|
+
- **Default:** `undefined`
|
9
9
|
|
10
10
|
Set the ssr option according to the entry. The attributes in the option are the same as [ssr](./ssr.md). The specified value will be replaced and merged with the content of the ssr attribute. For example:
|
11
11
|
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: source.alias
|
3
2
|
sidebar_label: alias
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# source.alias
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [source.alias](https://modernjs.dev/builder/en/api/config-source.html#sourcealias)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/source/alias.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: source.compileJsDataURI
|
3
2
|
sidebar_label: compileJsDataURI
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# source.compileJsDataURI
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [source.compileJsDataURI](https://modernjs.dev/builder/en/api/config-source.html#sourcecompilejsdatauri)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/source/compileJsDataURI.md'
|
@@ -4,8 +4,8 @@ sidebar_label: configDir
|
|
4
4
|
---
|
5
5
|
# configDir
|
6
6
|
|
7
|
-
- Type
|
8
|
-
- Default
|
7
|
+
- **Type:** `string`
|
8
|
+
- **Default:** `./config`
|
9
9
|
|
10
10
|
Modern.js supports placing some files in the `./config` folder to customize HTML templates, icons, static resources, etc. For details, please refer to [File Convention](/apis/app/hooks/config/html).
|
11
11
|
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: source.define
|
3
2
|
sidebar_label: define
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# source.define
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [source.define](https://modernjs.dev/builder/en/api/config-source.html#sourcedefine)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/source/define.md'
|
@@ -4,8 +4,8 @@ sidebar_label: designSystem
|
|
4
4
|
---
|
5
5
|
# designSystem
|
6
6
|
|
7
|
-
- Type
|
8
|
-
- Default
|
7
|
+
- **Type:** `Object`
|
8
|
+
- **Default:** See configuration details below。
|
9
9
|
|
10
10
|
:::caution Caution
|
11
11
|
You need to enable the Tailwind CSS feature through `pnpm run new` first.
|
@@ -4,8 +4,8 @@ sidebar_label: disableDefaultEntries
|
|
4
4
|
---
|
5
5
|
# disableDefaultEntries
|
6
6
|
|
7
|
-
- Type
|
8
|
-
- Default
|
7
|
+
- **Type:** `boolean`
|
8
|
+
- **Default:** `false`
|
9
9
|
|
10
10
|
Turn off the function of automatically identifying the application build entry according to the project directory structure. By default, the Modern.js will get the corresponding build entry according to the project directory structure.
|
11
11
|
|
@@ -5,8 +5,8 @@ sidebar_label: disableEntryDirs
|
|
5
5
|
---
|
6
6
|
# disableEntryDirs
|
7
7
|
|
8
|
-
- Type
|
9
|
-
- Default
|
8
|
+
- **Type:** `string[]`
|
9
|
+
- **Default:** `[]`
|
10
10
|
|
11
11
|
By default, application entries are identified based on the'src 'directory, you can disable some directories from being identified as application entries with this option.
|
12
12
|
|
@@ -4,8 +4,8 @@ sidebar_label: entriesDir
|
|
4
4
|
---
|
5
5
|
# entriesDir
|
6
6
|
|
7
|
-
- Type
|
8
|
-
- Default
|
7
|
+
- **Type:** `string`
|
8
|
+
- **Default:** `./src`
|
9
9
|
|
10
10
|
By default, the application entry will be identified according to the `src` directory. You can customize the identification directory of the application entry through this option.
|
11
11
|
|
@@ -4,8 +4,8 @@ sidebar_label: entries
|
|
4
4
|
---
|
5
5
|
# entries
|
6
6
|
|
7
|
-
- Type
|
8
|
-
- Default
|
7
|
+
- **Type:** `Object = { [ entryName: string ]: string | Object }`
|
8
|
+
- **Default:** Default entry object dynamically settled according to the current project directory structure.
|
9
9
|
|
10
10
|
For most scenarios, Modern.js automatically generated entries according to the directory structure can meet most business requirements. For details, please refer to [Entries](/guides/concept/entries)。
|
11
11
|
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: source.exclude
|
3
2
|
sidebar_label: exclude
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# source.exclude
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [source.exclude](https://modernjs.dev/builder/en/api/config-source.html#sourceexclude)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/source/exclude.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: source.globalVars
|
3
2
|
sidebar_label: globalVars
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# source.globalVars
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [source.globalVars](https://modernjs.dev/builder/en/api/config-source.html#sourceglobalvars)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/source/globalVars.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: source.include
|
3
2
|
sidebar_label: include
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# source.include
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [source.include](https://modernjs.dev/builder/en/api/config-source.html#sourceinclude)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/source/include.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: source.moduleScopes
|
3
2
|
sidebar_label: moduleScopes
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# source.moduleScopes
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [source.moduleScopes](https://modernjs.dev/builder/en/api/config-source.html#sourcemodulescopes)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/source/moduleScopes.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: source.preEntry
|
3
2
|
sidebar_label: preEntry
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# source.preEntry
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [source.preEntry](https://modernjs.dev/builder/en/api/config-source.html#sourcepreentry)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/source/preEntry.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: source.resolveExtensionPrefix
|
3
2
|
sidebar_label: resolveExtensionPrefix
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# source.resolveExtensionPrefix
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [source.resolveExtensionPrefix](https://modernjs.dev/builder/en/api/config-source.html#sourceresolveextensionprefix)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/source/resolveExtensionPrefix.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: source.resolveMainFields
|
3
2
|
sidebar_label: resolveMainFields
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# source.resolveMainFields
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [source.resolveMainFields](https://modernjs.dev/builder/en/api/config-source.html#sourceresolvemainfields)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/source/resolveMainFields.md'
|
@@ -5,8 +5,8 @@ sidebar_position: 1
|
|
5
5
|
---
|
6
6
|
# transformer
|
7
7
|
|
8
|
-
- Type
|
9
|
-
- Default
|
8
|
+
- **Type:** `'babel-jest' | 'ts-jest'`
|
9
|
+
- **Default:** `babel-jest`
|
10
10
|
|
11
11
|
:::caution Caution
|
12
12
|
First you need to enable the "Unit Test" function using [new](/apis/app/commands/new) command.
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.autoprefixer
|
3
2
|
sidebar_label: autoprefixer
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# tools.autoprefixer
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [tools.autoprefixer](https://modernjs.dev/builder/en/api/config-tools.html#toolsautoprefixer)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/tools/autoprefixer.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.babel
|
3
2
|
sidebar_label: babel
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# tools.babel
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [tools.babel](https://modernjs.dev/builder/en/api/config-tools.html#toolsbabel)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/tools/babel.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.cssExtract
|
3
2
|
sidebar_label: cssExtract
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# tools.cssExtract
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [tools.cssExtract](https://modernjs.dev/builder/en/api/config-tools.html#toolscssextract)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/tools/cssExtract.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.cssLoader
|
3
2
|
sidebar_label: cssLoader
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# tools.cssLoader
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [tools.cssLoader](https://modernjs.dev/builder/en/api/config-tools.html#toolscssloader)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/tools/cssLoader.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.devServer
|
3
2
|
sidebar_label: devServer
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# tools.devServer
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [tools.devServer](https://modernjs.dev/builder/en/api/config-tools.html#toolsdevserver)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/tools/devServer.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.htmlPlugin
|
3
2
|
sidebar_label: htmlPlugin
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# tools.htmlPlugin
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [tools.htmlPlugin](https://modernjs.dev/builder/en/api/config-tools.html#toolshtmlplugin)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/tools/htmlPlugin.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.inspector
|
3
2
|
sidebar_label: inspector
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# tools.inspector
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [tools.inspector](https://modernjs.dev/builder/en/api/config-tools.html#toolsinspector)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/tools/inspector.md'
|
@@ -5,8 +5,8 @@ sidebar_label: jest
|
|
5
5
|
---
|
6
6
|
# jest
|
7
7
|
|
8
|
-
- Type
|
9
|
-
- Default
|
8
|
+
- **Type:** `Object | Function`
|
9
|
+
- **Default:** `{}`
|
10
10
|
|
11
11
|
:::caution Caution
|
12
12
|
First you need to enable the "Unit Test" function using [new](/apis/app/commands/new) command.
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.less
|
3
2
|
sidebar_label: less
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# tools.less
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [tools.less](https://modernjs.dev/builder/en/api/config-tools.html#toolsless)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/tools/less.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.minifyCss
|
3
2
|
sidebar_label: minifyCss
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# tools.minifyCss
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [tools.minifyCss](https://modernjs.dev/builder/en/api/config-tools.html#toolsminifycss)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/tools/minifyCss.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.postcss
|
3
2
|
sidebar_label: postcss
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# tools.postcss
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [tools.postcss](https://modernjs.dev/builder/en/api/config-tools.html#toolspostcss)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/tools/postcss.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.pug
|
3
2
|
sidebar_label: pug
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# tools.pug
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [tools.pug](https://modernjs.dev/builder/en/api/config-tools.html#toolspug)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/tools/pug.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.sass
|
3
2
|
sidebar_label: sass
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# tools.sass
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [tools.sass](https://modernjs.dev/builder/en/api/config-tools.html#toolssass)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/tools/sass.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.styleLoader
|
3
2
|
sidebar_label: styleLoader
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# tools.styleLoader
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [tools.styleLoader](https://modernjs.dev/builder/en/api/config-tools.html#toolsstyleloader)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/tools/styleLoader.md'
|
@@ -1,10 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.styledComponents
|
3
2
|
sidebar_label: styledComponents
|
4
3
|
---
|
5
4
|
|
6
|
-
|
7
|
-
|
5
|
+
# tools.styledComponents
|
6
|
+
|
7
|
+
:::tip
|
8
|
+
This config is provided by Modern.js Builder, more detail can see [tools.styledComponents](https://modernjs.dev/builder/en/api/config-tools.html#toolsstyledcomponents)。
|
8
9
|
:::
|
9
10
|
|
10
11
|
import Main from '@modern-js/builder-doc/docs/en/config/tools/styledComponents.md'
|
@@ -1,15 +1,11 @@
|
|
1
1
|
---
|
2
|
-
title: tools.tailwindcss
|
3
|
-
|
4
2
|
sidebar_label: tailwindcss
|
5
3
|
---
|
6
|
-
# tailwindcss
|
7
4
|
|
8
|
-
|
9
|
-
- Default: See configuration details below.
|
5
|
+
# tools.tailwindcss
|
10
6
|
|
11
|
-
|
12
|
-
|
7
|
+
- **Type:** `Object | Function`
|
8
|
+
- **Default:**
|
13
9
|
|
14
10
|
```js
|
15
11
|
const tailwind = {
|
@@ -23,21 +19,17 @@ const tailwind = {
|
|
23
19
|
'./src/**/*.tsx',
|
24
20
|
'./storybook/**/*',
|
25
21
|
],
|
26
|
-
|
22
|
+
// Use source.design System config as Tailwind CSS theme config
|
23
|
+
theme: source.designSystem,
|
27
24
|
};
|
28
25
|
```
|
29
26
|
|
30
|
-
:::tip Tips
|
31
|
-
More about: <a href="https://tailwindcss.com/docs/configuration" target="_blank">TailwindCSS configuration</a>。
|
32
|
-
|
33
|
-
:::
|
34
|
-
|
35
|
-
</details>
|
36
|
-
|
37
27
|
When the value is of type `Object`, rhe configuration corresponding to [TailwindCSS](https://tailwindcss.com/docs/configuration) is merged with the default configuration through `Object.assign`.
|
38
28
|
|
39
29
|
When the value is of type `Function`, the object returned by the function is merged with the default configuration by `Object.assign`.
|
40
30
|
|
41
|
-
|
31
|
+
### Limitations
|
32
|
+
|
33
|
+
The `theme` attribute is not allowed, otherwise the build will fail. Modern.js use [source.designSystem](/configure/app/source/design-system) as the Tailwind CSS Theme configuration.
|
42
34
|
|
43
35
|
Other uses are consistent with [Tailwind CSS](https://tailwindcss.com/docs/configuration)。
|