@modern-js/app-tools 2.40.0 → 2.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/cjs/analyze/getHtmlTemplate.js +5 -5
  2. package/dist/cjs/analyze/templates.js +7 -6
  3. package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +3 -1
  4. package/dist/cjs/builder/shared/bundlerPlugins/RouterPlugin.js +1 -1
  5. package/dist/cjs/config/default.js +2 -1
  6. package/dist/cjs/defineConfig.js +8 -6
  7. package/dist/esm/analyze/getHtmlTemplate.js +5 -5
  8. package/dist/esm/analyze/templates.js +6 -6
  9. package/dist/esm/builder/shared/builderPlugins/adapterSSR.js +6 -4
  10. package/dist/esm/builder/shared/bundlerPlugins/RouterPlugin.js +1 -1
  11. package/dist/esm/config/default.js +2 -1
  12. package/dist/esm/config/initialize/inits.js +19 -19
  13. package/dist/esm/defineConfig.js +1 -1
  14. package/dist/esm-node/analyze/getHtmlTemplate.js +5 -5
  15. package/dist/esm-node/analyze/templates.js +7 -6
  16. package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.js +3 -1
  17. package/dist/esm-node/builder/shared/bundlerPlugins/RouterPlugin.js +1 -1
  18. package/dist/esm-node/config/default.js +2 -1
  19. package/dist/esm-node/defineConfig.js +8 -6
  20. package/dist/types/analyze/constants.d.ts +19 -19
  21. package/dist/types/analyze/generateCode.d.ts +9 -16
  22. package/dist/types/analyze/getBundleEntry.d.ts +1 -1
  23. package/dist/types/analyze/getClientRoutes/getRoutes.d.ts +7 -13
  24. package/dist/types/analyze/getClientRoutes/getRoutesLegacy.d.ts +7 -13
  25. package/dist/types/analyze/getClientRoutes/index.d.ts +1 -1
  26. package/dist/types/analyze/getClientRoutes/utils.d.ts +1 -1
  27. package/dist/types/analyze/getFileSystemEntry.d.ts +1 -1
  28. package/dist/types/analyze/getHtmlTemplate.d.ts +4 -7
  29. package/dist/types/analyze/getServerRoutes.d.ts +4 -7
  30. package/dist/types/analyze/index.d.ts +3 -5
  31. package/dist/types/analyze/isDefaultExportFunction.d.ts +1 -1
  32. package/dist/types/analyze/makeLegalIdentifier.d.ts +1 -1
  33. package/dist/types/analyze/nestedRoutes.d.ts +3 -3
  34. package/dist/types/analyze/templates.d.ts +22 -40
  35. package/dist/types/analyze/utils.d.ts +10 -19
  36. package/dist/types/builder/builder-rspack/adapterCopy.d.ts +1 -1
  37. package/dist/types/builder/builder-rspack/index.d.ts +1 -1
  38. package/dist/types/builder/builder-webpack/adapterModern.d.ts +1 -1
  39. package/dist/types/builder/builder-webpack/createCopyPattern.d.ts +20 -20
  40. package/dist/types/builder/builder-webpack/index.d.ts +1 -1
  41. package/dist/types/builder/generator/createBuilderOptions.d.ts +1 -1
  42. package/dist/types/builder/generator/createBuilderProviderConfig.d.ts +1 -1
  43. package/dist/types/builder/generator/getBuilderTargets.d.ts +1 -1
  44. package/dist/types/builder/generator/index.d.ts +2 -2
  45. package/dist/types/builder/index.d.ts +1 -1
  46. package/dist/types/builder/shared/builderPlugins/adapterBasic.d.ts +1 -1
  47. package/dist/types/builder/shared/builderPlugins/adapterHtml.d.ts +1 -1
  48. package/dist/types/builder/shared/builderPlugins/adapterSSR.d.ts +1 -1
  49. package/dist/types/builder/shared/builderPlugins/index.d.ts +1 -1
  50. package/dist/types/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.d.ts +5 -5
  51. package/dist/types/builder/shared/bundlerPlugins/HtmlBottomTemplate.d.ts +7 -7
  52. package/dist/types/builder/shared/bundlerPlugins/RouterPlugin.d.ts +24 -31
  53. package/dist/types/builder/shared/bundlerPlugins/index.d.ts +1 -1
  54. package/dist/types/builder/shared/createCopyInfo.d.ts +4 -4
  55. package/dist/types/builder/shared/index.d.ts +1 -1
  56. package/dist/types/builder/shared/loaders/serverModuleLoader.d.ts +1 -1
  57. package/dist/types/builder/shared/types.d.ts +3 -3
  58. package/dist/types/commands/build.d.ts +1 -1
  59. package/dist/types/commands/deploy.d.ts +1 -1
  60. package/dist/types/commands/dev.d.ts +2 -2
  61. package/dist/types/commands/index.d.ts +1 -1
  62. package/dist/types/commands/inspect.d.ts +7 -7
  63. package/dist/types/commands/serve.d.ts +1 -1
  64. package/dist/types/config/default.d.ts +1 -1
  65. package/dist/types/config/index.d.ts +1 -1
  66. package/dist/types/config/initialize/index.d.ts +1 -1
  67. package/dist/types/config/initialize/inits.d.ts +1 -1
  68. package/dist/types/config/legacy/createHtmlConfig.d.ts +1 -1
  69. package/dist/types/config/legacy/createOutputConfig.d.ts +1 -1
  70. package/dist/types/config/legacy/createSourceConfig.d.ts +1 -1
  71. package/dist/types/config/legacy/createToolsConfig.d.ts +1 -1
  72. package/dist/types/config/legacy/index.d.ts +1 -1
  73. package/dist/types/defineConfig.d.ts +1 -1
  74. package/dist/types/exports/server.d.ts +1 -1
  75. package/dist/types/hooks.d.ts +1 -1
  76. package/dist/types/index.d.ts +6 -6
  77. package/dist/types/initialize/index.d.ts +3 -5
  78. package/dist/types/locale/en.d.ts +38 -38
  79. package/dist/types/locale/index.d.ts +75 -75
  80. package/dist/types/locale/zh.d.ts +38 -38
  81. package/dist/types/types/config/deploy.d.ts +21 -21
  82. package/dist/types/types/config/dev.d.ts +10 -10
  83. package/dist/types/types/config/experiments.d.ts +1 -1
  84. package/dist/types/types/config/html.d.ts +1 -1
  85. package/dist/types/types/config/index.d.ts +38 -38
  86. package/dist/types/types/config/output.d.ts +35 -28
  87. package/dist/types/types/config/performance.d.ts +1 -1
  88. package/dist/types/types/config/security.d.ts +1 -1
  89. package/dist/types/types/config/source.d.ts +52 -52
  90. package/dist/types/types/config/testing.d.ts +6 -6
  91. package/dist/types/types/config/tools.d.ts +26 -24
  92. package/dist/types/types/hooks.d.ts +75 -75
  93. package/dist/types/types/index.d.ts +17 -17
  94. package/dist/types/types/legacyConfig/deploy.d.ts +5 -5
  95. package/dist/types/types/legacyConfig/dev.d.ts +9 -9
  96. package/dist/types/types/legacyConfig/index.d.ts +16 -16
  97. package/dist/types/types/legacyConfig/output.d.ts +45 -45
  98. package/dist/types/types/legacyConfig/source.d.ts +22 -22
  99. package/dist/types/types/legacyConfig/testing.d.ts +6 -6
  100. package/dist/types/types/legacyConfig/tools.d.ts +10 -10
  101. package/dist/types/types/utils.d.ts +4 -4
  102. package/dist/types/utils/config.d.ts +7 -13
  103. package/dist/types/utils/createServer.d.ts +5 -5
  104. package/dist/types/utils/env.d.ts +1 -1
  105. package/dist/types/utils/generateWatchFiles.d.ts +1 -1
  106. package/dist/types/utils/getSelectedEntries.d.ts +1 -1
  107. package/dist/types/utils/getServerInternalPlugins.d.ts +1 -1
  108. package/dist/types/utils/printInstructions.d.ts +1 -1
  109. package/dist/types/utils/restart.d.ts +1 -1
  110. package/dist/types/utils/routes.d.ts +1 -1
  111. package/dist/types/utils/types.d.ts +13 -13
  112. package/package.json +26 -26
@@ -1,7 +1,5 @@
1
1
  import type { CliPlugin, AppTools } from '../types';
2
- declare const _default: ({
3
- bundler
4
- }: {
5
- bundler: 'rspack' | 'webpack';
2
+ declare const _default: ({ bundler, }: {
3
+ bundler: 'rspack' | 'webpack';
6
4
  }) => CliPlugin<AppTools<'shared'>>;
7
- export default _default;
5
+ export default _default;
@@ -1,40 +1,40 @@
1
1
  export declare const EN_LOCALE: {
2
- command: {
3
- shared: {
4
- analyze: string;
5
- config: string;
6
- skipBuild: string;
7
- noNeedInstall: string;
2
+ command: {
3
+ shared: {
4
+ analyze: string;
5
+ config: string;
6
+ skipBuild: string;
7
+ noNeedInstall: string;
8
+ };
9
+ dev: {
10
+ describe: string;
11
+ entry: string;
12
+ apiOnly: string;
13
+ webOnly: string;
14
+ selectEntry: string;
15
+ requireEntry: string;
16
+ };
17
+ build: {
18
+ describe: string;
19
+ };
20
+ serve: {
21
+ describe: string;
22
+ };
23
+ deploy: {
24
+ describe: string;
25
+ };
26
+ new: {
27
+ describe: string;
28
+ debug: string;
29
+ config: string;
30
+ distTag: string;
31
+ registry: string;
32
+ lang: string;
33
+ };
34
+ inspect: {
35
+ env: string;
36
+ output: string;
37
+ verbose: string;
38
+ };
8
39
  };
9
- dev: {
10
- describe: string;
11
- entry: string;
12
- apiOnly: string;
13
- webOnly: string;
14
- selectEntry: string;
15
- requireEntry: string;
16
- };
17
- build: {
18
- describe: string;
19
- };
20
- serve: {
21
- describe: string;
22
- };
23
- deploy: {
24
- describe: string;
25
- };
26
- new: {
27
- describe: string;
28
- debug: string;
29
- config: string;
30
- distTag: string;
31
- registry: string;
32
- lang: string;
33
- };
34
- inspect: {
35
- env: string;
36
- output: string;
37
- verbose: string;
38
- };
39
- };
40
- };
40
+ };
@@ -1,82 +1,82 @@
1
1
  import { I18n } from '@modern-js/plugin-i18n';
2
2
  declare const i18n: I18n;
3
3
  declare const localeKeys: {
4
- command: {
5
- shared: {
6
- analyze: string;
7
- config: string;
8
- skipBuild: string;
9
- noNeedInstall: string;
4
+ command: {
5
+ shared: {
6
+ analyze: string;
7
+ config: string;
8
+ skipBuild: string;
9
+ noNeedInstall: string;
10
+ };
11
+ dev: {
12
+ describe: string;
13
+ entry: string;
14
+ apiOnly: string;
15
+ webOnly: string;
16
+ selectEntry: string;
17
+ requireEntry: string;
18
+ };
19
+ build: {
20
+ describe: string;
21
+ };
22
+ serve: {
23
+ describe: string;
24
+ };
25
+ deploy: {
26
+ describe: string;
27
+ };
28
+ new: {
29
+ describe: string;
30
+ debug: string;
31
+ config: string;
32
+ distTag: string;
33
+ registry: string;
34
+ lang: string;
35
+ };
36
+ inspect: {
37
+ env: string;
38
+ output: string;
39
+ verbose: string;
40
+ };
10
41
  };
11
- dev: {
12
- describe: string;
13
- entry: string;
14
- apiOnly: string;
15
- webOnly: string;
16
- selectEntry: string;
17
- requireEntry: string;
18
- };
19
- build: {
20
- describe: string;
21
- };
22
- serve: {
23
- describe: string;
24
- };
25
- deploy: {
26
- describe: string;
27
- };
28
- new: {
29
- describe: string;
30
- debug: string;
31
- config: string;
32
- distTag: string;
33
- registry: string;
34
- lang: string;
35
- };
36
- inspect: {
37
- env: string;
38
- output: string;
39
- verbose: string;
40
- };
41
- };
42
42
  } | {
43
- command: {
44
- shared: {
45
- analyze: string;
46
- config: string;
47
- skipBuild: string;
48
- noNeedInstall: string;
49
- };
50
- dev: {
51
- describe: string;
52
- entry: string;
53
- apiOnly: string;
54
- webOnly: string;
55
- selectEntry: string;
56
- requireEntry: string;
57
- };
58
- build: {
59
- describe: string;
60
- };
61
- serve: {
62
- describe: string;
63
- };
64
- deploy: {
65
- describe: string;
66
- };
67
- new: {
68
- describe: string;
69
- debug: string;
70
- config: string;
71
- distTag: string;
72
- registry: string;
73
- lang: string;
74
- };
75
- inspect: {
76
- env: string;
77
- output: string;
78
- verbose: string;
43
+ command: {
44
+ shared: {
45
+ analyze: string;
46
+ config: string;
47
+ skipBuild: string;
48
+ noNeedInstall: string;
49
+ };
50
+ dev: {
51
+ describe: string;
52
+ entry: string;
53
+ apiOnly: string;
54
+ webOnly: string;
55
+ selectEntry: string;
56
+ requireEntry: string;
57
+ };
58
+ build: {
59
+ describe: string;
60
+ };
61
+ serve: {
62
+ describe: string;
63
+ };
64
+ deploy: {
65
+ describe: string;
66
+ };
67
+ new: {
68
+ describe: string;
69
+ debug: string;
70
+ config: string;
71
+ distTag: string;
72
+ registry: string;
73
+ lang: string;
74
+ };
75
+ inspect: {
76
+ env: string;
77
+ output: string;
78
+ verbose: string;
79
+ };
79
80
  };
80
- };
81
81
  };
82
- export { i18n, localeKeys };
82
+ export { i18n, localeKeys };
@@ -1,40 +1,40 @@
1
1
  export declare const ZH_LOCALE: {
2
- command: {
3
- shared: {
4
- analyze: string;
5
- config: string;
6
- skipBuild: string;
7
- noNeedInstall: string;
2
+ command: {
3
+ shared: {
4
+ analyze: string;
5
+ config: string;
6
+ skipBuild: string;
7
+ noNeedInstall: string;
8
+ };
9
+ dev: {
10
+ describe: string;
11
+ entry: string;
12
+ apiOnly: string;
13
+ webOnly: string;
14
+ selectEntry: string;
15
+ requireEntry: string;
16
+ };
17
+ build: {
18
+ describe: string;
19
+ };
20
+ serve: {
21
+ describe: string;
22
+ };
23
+ deploy: {
24
+ describe: string;
25
+ };
26
+ new: {
27
+ describe: string;
28
+ debug: string;
29
+ config: string;
30
+ distTag: string;
31
+ registry: string;
32
+ lang: string;
33
+ };
34
+ inspect: {
35
+ env: string;
36
+ output: string;
37
+ verbose: string;
38
+ };
8
39
  };
9
- dev: {
10
- describe: string;
11
- entry: string;
12
- apiOnly: string;
13
- webOnly: string;
14
- selectEntry: string;
15
- requireEntry: string;
16
- };
17
- build: {
18
- describe: string;
19
- };
20
- serve: {
21
- describe: string;
22
- };
23
- deploy: {
24
- describe: string;
25
- };
26
- new: {
27
- describe: string;
28
- debug: string;
29
- config: string;
30
- distTag: string;
31
- registry: string;
32
- lang: string;
33
- };
34
- inspect: {
35
- env: string;
36
- output: string;
37
- verbose: string;
38
- };
39
- };
40
- };
40
+ };
@@ -1,24 +1,24 @@
1
1
  export interface MicroFrontend {
2
- /**
3
- * Specifies whether to enable the HTML entry.
4
- * When set to `true`, the current child application will be externalized for `react` and `react-dom`.
5
- * @default true
6
- */
7
- enableHtmlEntry?: boolean;
8
- /**
9
- * Specifies whether to use the external base library.
10
- * @default false
11
- */
12
- externalBasicLibrary?: boolean;
13
- moduleApp?: string;
2
+ /**
3
+ * Specifies whether to enable the HTML entry.
4
+ * When set to `true`, the current child application will be externalized for `react` and `react-dom`.
5
+ * @default true
6
+ */
7
+ enableHtmlEntry?: boolean;
8
+ /**
9
+ * Specifies whether to use the external base library.
10
+ * @default false
11
+ */
12
+ externalBasicLibrary?: boolean;
13
+ moduleApp?: string;
14
14
  }
15
15
  export interface DeployUserConfig {
16
- /**
17
- * Used to configure micro-frontend sub-application information.
18
- * @default false
19
- */
20
- microFrontend?: boolean | MicroFrontend;
21
- worker?: {
22
- ssr?: boolean;
23
- };
24
- }
16
+ /**
17
+ * Used to configure micro-frontend sub-application information.
18
+ * @default false
19
+ */
20
+ microFrontend?: boolean | MicroFrontend;
21
+ worker?: {
22
+ ssr?: boolean;
23
+ };
24
+ }
@@ -2,14 +2,14 @@ import type { SharedBuilderConfig } from '@modern-js/builder-shared';
2
2
  type BuilderDevConfig = Required<SharedBuilderConfig>['dev'];
3
3
  export type DevProxyOptions = string | Record<string, string>;
4
4
  export interface DevUserConfig extends BuilderDevConfig {
5
- /**
6
- * Used to configure a global proxy based on whistle in the development environment,
7
- * which can be used to view and modify HTTP/HTTPS requests, responses, and can also be used as a proxy server.
8
- *
9
- * @requires `proxy` plugin.
10
- * This configuration is provided by `proxy` plugin.
11
- * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
12
- */
13
- proxy?: string | Record<string, string>;
5
+ /**
6
+ * Used to configure a global proxy based on whistle in the development environment,
7
+ * which can be used to view and modify HTTP/HTTPS requests, responses, and can also be used as a proxy server.
8
+ *
9
+ * @requires `proxy` plugin.
10
+ * This configuration is provided by `proxy` plugin.
11
+ * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
12
+ */
13
+ proxy?: string | Record<string, string>;
14
14
  }
15
- export {};
15
+ export {};
@@ -1,3 +1,3 @@
1
1
  import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
2
2
  export type BuilderExperimentsConfig = Required<BuilderConfig>['experiments'];
3
- export type ExperimentsUserConfig = BuilderExperimentsConfig;
3
+ export type ExperimentsUserConfig = BuilderExperimentsConfig;
@@ -2,4 +2,4 @@ import { UnwrapBuilderConfig } from '../utils';
2
2
  import type { WebpackBuilderConfig, RspackBuilderConfig } from '../../builder/shared';
3
3
  export type { SharedHtmlConfig } from '@modern-js/builder-shared';
4
4
  export type HtmlUserConfig = UnwrapBuilderConfig<WebpackBuilderConfig, 'html'>;
5
- export type RsHtmlUserConfig = UnwrapBuilderConfig<RspackBuilderConfig, 'html'>;
5
+ export type RsHtmlUserConfig = UnwrapBuilderConfig<RspackBuilderConfig, 'html'>;
@@ -12,52 +12,52 @@ import type { ExperimentsUserConfig } from './experiments';
12
12
  import type { PerformanceUserConfig, RsPerformanceConfig, SharedPerformanceConfig } from './performance';
13
13
  export * from './output';
14
14
  export interface RuntimeUserConfig {
15
- [name: string]: any;
15
+ [name: string]: any;
16
16
  }
17
17
  export interface RuntimeByEntriesUserConfig {
18
- [name: string]: RuntimeUserConfig;
18
+ [name: string]: RuntimeUserConfig;
19
19
  }
20
20
  export interface SharedUserConfig {
21
- server?: ServerUserConfig;
22
- source?: SharedSourceConfig;
23
- output?: SharedOutputConfig;
24
- /**
25
- * The configuration of `bff` is provided by `bff` plugin.
26
- * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
27
- * @requires `bff` plugin
28
- */
29
- bff?: BffUserConfig;
30
- dev?: DevUserConfig;
31
- deploy?: DeployUserConfig;
32
- runtime?: RuntimeUserConfig;
33
- runtimeByEntries?: RuntimeByEntriesUserConfig;
34
- html?: SharedHtmlConfig;
35
- tools?: SharedToolsConfig;
36
- security?: SharedSecurityConfig;
37
- testing?: TestingUserConfig;
38
- builderPlugins?: BuilderPlugin[];
39
- performance?: SharedPerformanceConfig;
40
- devtools?: any;
21
+ server?: ServerUserConfig;
22
+ source?: SharedSourceConfig;
23
+ output?: SharedOutputConfig;
24
+ /**
25
+ * The configuration of `bff` is provided by `bff` plugin.
26
+ * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
27
+ * @requires `bff` plugin
28
+ */
29
+ bff?: BffUserConfig;
30
+ dev?: DevUserConfig;
31
+ deploy?: DeployUserConfig;
32
+ runtime?: RuntimeUserConfig;
33
+ runtimeByEntries?: RuntimeByEntriesUserConfig;
34
+ html?: SharedHtmlConfig;
35
+ tools?: SharedToolsConfig;
36
+ security?: SharedSecurityConfig;
37
+ testing?: TestingUserConfig;
38
+ builderPlugins?: BuilderPlugin[];
39
+ performance?: SharedPerformanceConfig;
40
+ devtools?: any;
41
41
  }
42
42
  export interface AppToolsUserConfig extends SharedUserConfig {
43
- source?: SourceUserConfig;
44
- output?: OutputUserConfig;
45
- html?: HtmlUserConfig;
46
- tools?: ToolsUserConfig;
47
- security?: SecurityUserConfig;
48
- performance?: PerformanceUserConfig;
49
- experiments?: ExperimentsUserConfig;
43
+ source?: SourceUserConfig;
44
+ output?: OutputUserConfig;
45
+ html?: HtmlUserConfig;
46
+ tools?: ToolsUserConfig;
47
+ security?: SecurityUserConfig;
48
+ performance?: PerformanceUserConfig;
49
+ experiments?: ExperimentsUserConfig;
50
50
  }
51
51
  export interface RsAppToolsUserConfig extends SharedUserConfig {
52
- source?: RsSourceUserConfig;
53
- output?: RsOutputUserConfig;
54
- html?: RsHtmlUserConfig;
55
- tools?: RsToolsUserConfig;
56
- performance?: RsPerformanceConfig;
57
- security?: RsSecurityConfig;
52
+ source?: RsSourceUserConfig;
53
+ output?: RsOutputUserConfig;
54
+ html?: RsHtmlUserConfig;
55
+ tools?: RsToolsUserConfig;
56
+ performance?: RsPerformanceConfig;
57
+ security?: RsSecurityConfig;
58
58
  }
59
59
  interface SharedNormalizedConfig<RawConfig> {
60
- cliOptions?: Record<string, any>;
61
- _raw: RawConfig;
60
+ cliOptions?: Record<string, any>;
61
+ _raw: RawConfig;
62
62
  }
63
- export type AppToolsNormalizedConfig<Config = SharedUserConfig> = Required<Config> & SharedNormalizedConfig<Config>;
63
+ export type AppToolsNormalizedConfig<Config = SharedUserConfig> = Required<Config> & SharedNormalizedConfig<Config>;
@@ -5,32 +5,39 @@ import { UnwrapBuilderConfig } from '../utils';
5
5
  export type BuilderOutputConfig = UnwrapBuilderConfig<WebpackBuilderConfig, 'output'>;
6
6
  export type RsBuilderOutputConfig = UnwrapBuilderConfig<RspackBuilderConfig, 'output'>;
7
7
  export interface SharedOutputConfig extends BuilderSharedOutputConfig {
8
- /**
9
- * Enable SSG for self-controlled routing or conventional routing.
10
- * @default false
11
- */
12
- ssg?: SSGConfig;
13
- /**
14
- * When using convention-based routing, the framework will split js and css based on the route to load on demand.
15
- * If your project does not want to split js and css based on routes, you can set this option to false.
16
- * @default true
17
- */
18
- splitRouteChunks?: boolean;
19
- /**
20
- * Used to control whether to inject the polyfill of the Node module into the code.
21
- * @default true
22
- */
23
- disableNodePolyfill?: boolean;
24
- /**
25
- * Used to control whether to inject convention-based routing information into the HTML.
26
- * @default true
27
- */
28
- enableInlineRouteManifests?: boolean;
29
- /**
30
- * Specify the temporary directory for framework generated files.
31
- */
32
- tempDir?: string;
8
+ /**
9
+ * Enable SSG for self-controlled routing or conventional routing.
10
+ * @default false
11
+ */
12
+ ssg?: SSGConfig;
13
+ /**
14
+ * When using convention-based routing, the framework will split js and css based on the route to load on demand.
15
+ * If your project does not want to split js and css based on routes, you can set this option to false.
16
+ * @default true
17
+ */
18
+ splitRouteChunks?: boolean;
19
+ /**
20
+ * Used to control whether to inject the polyfill of the Node module into the code.
21
+ * @default true
22
+ */
23
+ disableNodePolyfill?: boolean;
24
+ /**
25
+ * Used to control whether to inject convention-based routing information into the HTML.
26
+ * @default true
27
+ */
28
+ enableInlineRouteManifests?: boolean;
29
+ /**
30
+ * Used to control whether to inject convention-based routing information into the HTML.
31
+ * @default false
32
+ */
33
+ disableInlineRouteManifests?: boolean;
34
+ /**
35
+ * Specify the temporary directory for framework generated files.
36
+ */
37
+ tempDir?: string;
33
38
  }
34
- export interface OutputUserConfig extends BuilderOutputConfig, SharedOutputConfig {}
35
- export interface RsOutputUserConfig extends RsBuilderOutputConfig, SharedOutputConfig {}
36
- export type { SSGRouteOptions, SSGSingleEntryOptions, SSGMultiEntryOptions, SSGConfig } from '@modern-js/types';
39
+ export interface OutputUserConfig extends BuilderOutputConfig, SharedOutputConfig {
40
+ }
41
+ export interface RsOutputUserConfig extends RsBuilderOutputConfig, SharedOutputConfig {
42
+ }
43
+ export type { SSGRouteOptions, SSGSingleEntryOptions, SSGMultiEntryOptions, SSGConfig, } from '@modern-js/types';
@@ -3,4 +3,4 @@ import type { WebpackBuilderConfig, RspackBuilderConfig } from '../../builder/sh
3
3
  export type { SharedPerformanceConfig } from '@modern-js/builder-shared';
4
4
  export type BuilderPerformanceConfig = UnwrapBuilderConfig<WebpackBuilderConfig, 'performance'>;
5
5
  export type RsPerformanceConfig = UnwrapBuilderConfig<RspackBuilderConfig, 'performance'>;
6
- export type PerformanceUserConfig = BuilderPerformanceConfig;
6
+ export type PerformanceUserConfig = BuilderPerformanceConfig;
@@ -4,4 +4,4 @@ import { UnwrapBuilderConfig } from '../utils';
4
4
  export type BuilderSecurityConfig = UnwrapBuilderConfig<WebpackBuilderConfig, 'security'>;
5
5
  export type RsSecurityConfig = UnwrapBuilderConfig<RspackBuilderConfig, 'security'>;
6
6
  export type SecurityUserConfig = BuilderSecurityConfig;
7
- export type { SharedSecurityConfig };
7
+ export type { SharedSecurityConfig };