@modern-js/app-tools 2.41.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 (102) hide show
  1. package/dist/cjs/analyze/templates.js +7 -6
  2. package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +3 -1
  3. package/dist/cjs/config/default.js +2 -1
  4. package/dist/esm/analyze/templates.js +6 -6
  5. package/dist/esm/builder/shared/builderPlugins/adapterSSR.js +6 -4
  6. package/dist/esm/config/default.js +2 -1
  7. package/dist/esm-node/analyze/templates.js +7 -6
  8. package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.js +3 -1
  9. package/dist/esm-node/config/default.js +2 -1
  10. package/dist/types/analyze/constants.d.ts +19 -19
  11. package/dist/types/analyze/generateCode.d.ts +9 -16
  12. package/dist/types/analyze/getBundleEntry.d.ts +1 -1
  13. package/dist/types/analyze/getClientRoutes/getRoutes.d.ts +7 -13
  14. package/dist/types/analyze/getClientRoutes/getRoutesLegacy.d.ts +7 -13
  15. package/dist/types/analyze/getClientRoutes/index.d.ts +1 -1
  16. package/dist/types/analyze/getClientRoutes/utils.d.ts +1 -1
  17. package/dist/types/analyze/getFileSystemEntry.d.ts +1 -1
  18. package/dist/types/analyze/getHtmlTemplate.d.ts +4 -7
  19. package/dist/types/analyze/getServerRoutes.d.ts +4 -7
  20. package/dist/types/analyze/index.d.ts +3 -5
  21. package/dist/types/analyze/isDefaultExportFunction.d.ts +1 -1
  22. package/dist/types/analyze/makeLegalIdentifier.d.ts +1 -1
  23. package/dist/types/analyze/nestedRoutes.d.ts +3 -3
  24. package/dist/types/analyze/templates.d.ts +22 -40
  25. package/dist/types/analyze/utils.d.ts +10 -19
  26. package/dist/types/builder/builder-rspack/adapterCopy.d.ts +1 -1
  27. package/dist/types/builder/builder-rspack/index.d.ts +1 -1
  28. package/dist/types/builder/builder-webpack/adapterModern.d.ts +1 -1
  29. package/dist/types/builder/builder-webpack/createCopyPattern.d.ts +20 -20
  30. package/dist/types/builder/builder-webpack/index.d.ts +1 -1
  31. package/dist/types/builder/generator/createBuilderOptions.d.ts +1 -1
  32. package/dist/types/builder/generator/createBuilderProviderConfig.d.ts +1 -1
  33. package/dist/types/builder/generator/getBuilderTargets.d.ts +1 -1
  34. package/dist/types/builder/generator/index.d.ts +2 -2
  35. package/dist/types/builder/index.d.ts +1 -1
  36. package/dist/types/builder/shared/builderPlugins/adapterBasic.d.ts +1 -1
  37. package/dist/types/builder/shared/builderPlugins/adapterHtml.d.ts +1 -1
  38. package/dist/types/builder/shared/builderPlugins/adapterSSR.d.ts +1 -1
  39. package/dist/types/builder/shared/builderPlugins/index.d.ts +1 -1
  40. package/dist/types/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.d.ts +5 -5
  41. package/dist/types/builder/shared/bundlerPlugins/HtmlBottomTemplate.d.ts +7 -7
  42. package/dist/types/builder/shared/bundlerPlugins/RouterPlugin.d.ts +24 -31
  43. package/dist/types/builder/shared/bundlerPlugins/index.d.ts +1 -1
  44. package/dist/types/builder/shared/createCopyInfo.d.ts +4 -4
  45. package/dist/types/builder/shared/index.d.ts +1 -1
  46. package/dist/types/builder/shared/loaders/serverModuleLoader.d.ts +1 -1
  47. package/dist/types/builder/shared/types.d.ts +3 -3
  48. package/dist/types/commands/build.d.ts +1 -1
  49. package/dist/types/commands/deploy.d.ts +1 -1
  50. package/dist/types/commands/dev.d.ts +2 -2
  51. package/dist/types/commands/index.d.ts +1 -1
  52. package/dist/types/commands/inspect.d.ts +7 -7
  53. package/dist/types/commands/serve.d.ts +1 -1
  54. package/dist/types/config/default.d.ts +1 -1
  55. package/dist/types/config/index.d.ts +1 -1
  56. package/dist/types/config/initialize/index.d.ts +1 -1
  57. package/dist/types/config/initialize/inits.d.ts +1 -1
  58. package/dist/types/config/legacy/createHtmlConfig.d.ts +1 -1
  59. package/dist/types/config/legacy/createOutputConfig.d.ts +1 -1
  60. package/dist/types/config/legacy/createSourceConfig.d.ts +1 -1
  61. package/dist/types/config/legacy/createToolsConfig.d.ts +1 -1
  62. package/dist/types/config/legacy/index.d.ts +1 -1
  63. package/dist/types/defineConfig.d.ts +1 -1
  64. package/dist/types/exports/server.d.ts +1 -1
  65. package/dist/types/hooks.d.ts +1 -1
  66. package/dist/types/index.d.ts +6 -6
  67. package/dist/types/initialize/index.d.ts +3 -5
  68. package/dist/types/locale/en.d.ts +38 -38
  69. package/dist/types/locale/index.d.ts +75 -75
  70. package/dist/types/locale/zh.d.ts +38 -38
  71. package/dist/types/types/config/deploy.d.ts +21 -21
  72. package/dist/types/types/config/dev.d.ts +10 -10
  73. package/dist/types/types/config/experiments.d.ts +1 -1
  74. package/dist/types/types/config/html.d.ts +1 -1
  75. package/dist/types/types/config/index.d.ts +38 -38
  76. package/dist/types/types/config/output.d.ts +35 -28
  77. package/dist/types/types/config/performance.d.ts +1 -1
  78. package/dist/types/types/config/security.d.ts +1 -1
  79. package/dist/types/types/config/source.d.ts +52 -52
  80. package/dist/types/types/config/testing.d.ts +6 -6
  81. package/dist/types/types/config/tools.d.ts +26 -24
  82. package/dist/types/types/hooks.d.ts +75 -75
  83. package/dist/types/types/index.d.ts +17 -17
  84. package/dist/types/types/legacyConfig/deploy.d.ts +5 -5
  85. package/dist/types/types/legacyConfig/dev.d.ts +9 -9
  86. package/dist/types/types/legacyConfig/index.d.ts +16 -16
  87. package/dist/types/types/legacyConfig/output.d.ts +45 -45
  88. package/dist/types/types/legacyConfig/source.d.ts +22 -22
  89. package/dist/types/types/legacyConfig/testing.d.ts +6 -6
  90. package/dist/types/types/legacyConfig/tools.d.ts +10 -10
  91. package/dist/types/types/utils.d.ts +4 -4
  92. package/dist/types/utils/config.d.ts +7 -13
  93. package/dist/types/utils/createServer.d.ts +5 -5
  94. package/dist/types/utils/env.d.ts +1 -1
  95. package/dist/types/utils/generateWatchFiles.d.ts +1 -1
  96. package/dist/types/utils/getSelectedEntries.d.ts +1 -1
  97. package/dist/types/utils/getServerInternalPlugins.d.ts +1 -1
  98. package/dist/types/utils/printInstructions.d.ts +1 -1
  99. package/dist/types/utils/restart.d.ts +1 -1
  100. package/dist/types/utils/routes.d.ts +1 -1
  101. package/dist/types/utils/types.d.ts +13 -13
  102. package/package.json +24 -24
@@ -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 };
@@ -3,60 +3,60 @@ import type { WebpackBuilderConfig, RspackBuilderConfig } from '../../builder/sh
3
3
  export type BuilderSourceConfig = NonNullable<WebpackBuilderConfig['source']>;
4
4
  export type RsBuilderSourceConfig = NonNullable<RspackBuilderConfig['source']>;
5
5
  export type Entry = string | {
6
- /**
7
- * The entry file path.
8
- */
9
- entry: string;
10
- /**
11
- * Disable framework's behavior of automatically generating entry code.
12
- */
13
- disableMount?: boolean;
14
- /**
15
- * Specify the file path of custom bootstrap.
16
- */
17
- customBootstrap?: string;
6
+ /**
7
+ * The entry file path.
8
+ */
9
+ entry: string;
10
+ /**
11
+ * Disable framework's behavior of automatically generating entry code.
12
+ */
13
+ disableMount?: boolean;
14
+ /**
15
+ * Specify the file path of custom bootstrap.
16
+ */
17
+ customBootstrap?: string;
18
18
  };
19
19
  export type Entries = Record<string, Entry>;
20
20
  export interface SharedSourceConfig extends BuilderSharedSourceConfig {
21
- /**
22
- * Used to configure custom page entries.
23
- */
24
- entries?: Entries;
25
- /**
26
- * Used to configure the main entry name.
27
- * @default 'main'
28
- */
29
- mainEntryName?: string;
30
- /**
31
- * This option is used for Module Federation scenario.
32
- * When this option is enabled, framework will wrap the automatically generated entry files with dynamic import.
33
- * @default false
34
- */
35
- enableAsyncEntry?: boolean;
36
- /**
37
- * Used to disable the functionality of automatically identifying page entry points based on directory structure.
38
- * @default false
39
- */
40
- disableDefaultEntries?: boolean;
41
- /**
42
- * By default, framework scans the src directory to identify page entries.
43
- * You can customize the directory used for identifying page entries with this option.
44
- */
45
- entriesDir?: string;
46
- /**
47
- * By default, framework identifies the application entry point based on the `src` directory.
48
- * You can use this option to prevent some directories from being recognized as application entry points.
49
- */
50
- disableEntryDirs?: string[];
51
- /**
52
- * Customize the directory of the framework configuration files.
53
- */
54
- configDir?: string;
55
- /**
56
- * @deprecated designSystem is no longer required.
57
- * If you are using Tailwind CSS, you can now use the `theme` option of Tailwind CSS, they are the same.
58
- */
59
- designSystem?: Record<string, any>;
21
+ /**
22
+ * Used to configure custom page entries.
23
+ */
24
+ entries?: Entries;
25
+ /**
26
+ * Used to configure the main entry name.
27
+ * @default 'main'
28
+ */
29
+ mainEntryName?: string;
30
+ /**
31
+ * This option is used for Module Federation scenario.
32
+ * When this option is enabled, framework will wrap the automatically generated entry files with dynamic import.
33
+ * @default false
34
+ */
35
+ enableAsyncEntry?: boolean;
36
+ /**
37
+ * Used to disable the functionality of automatically identifying page entry points based on directory structure.
38
+ * @default false
39
+ */
40
+ disableDefaultEntries?: boolean;
41
+ /**
42
+ * By default, framework scans the src directory to identify page entries.
43
+ * You can customize the directory used for identifying page entries with this option.
44
+ */
45
+ entriesDir?: string;
46
+ /**
47
+ * By default, framework identifies the application entry point based on the `src` directory.
48
+ * You can use this option to prevent some directories from being recognized as application entry points.
49
+ */
50
+ disableEntryDirs?: string[];
51
+ /**
52
+ * Customize the directory of the framework configuration files.
53
+ */
54
+ configDir?: string;
55
+ /**
56
+ * @deprecated designSystem is no longer required.
57
+ * If you are using Tailwind CSS, you can now use the `theme` option of Tailwind CSS, they are the same.
58
+ */
59
+ designSystem?: Record<string, any>;
60
60
  }
61
61
  export type SourceUserConfig = BuilderSourceConfig & SharedSourceConfig;
62
- export type RsSourceUserConfig = RsBuilderSourceConfig & SharedSourceConfig;
62
+ export type RsSourceUserConfig = RsBuilderSourceConfig & SharedSourceConfig;
@@ -1,8 +1,8 @@
1
1
  import type { TestConfig } from '@modern-js/types';
2
2
  export interface TestingUserConfig {
3
- /**
4
- * Decide which transformer will be used to compile file
5
- * @default 'babel-jest'
6
- */
7
- transformer?: TestConfig['transformer'];
8
- }
3
+ /**
4
+ * Decide which transformer will be used to compile file
5
+ * @default 'babel-jest'
6
+ */
7
+ transformer?: TestConfig['transformer'];
8
+ }
@@ -5,32 +5,34 @@ import type { SharedToolsConfig as BuilderSharedToolsConfig } from '@modern-js/b
5
5
  import type { UnwrapBuilderConfig } from '../utils';
6
6
  import type { WebpackBuilderConfig, RspackBuilderConfig } from '../../builder/shared';
7
7
  export type BuilderToolsConfig = UnwrapBuilderConfig<WebpackBuilderConfig, 'tools'> & {
8
- esbuild?: PluginEsbuildOptions;
8
+ esbuild?: PluginEsbuildOptions;
9
9
  };
10
10
  export type RsBuilderToolsConfig = UnwrapBuilderConfig<RspackBuilderConfig, 'tools'>;
11
11
  export type Tailwindcss = Record<string, any> | ((options: Record<string, any>) => Record<string, any> | void);
12
12
  export interface SharedToolsConfig extends BuilderSharedToolsConfig {
13
- /**
14
- * Used to custom Tailwind CSS configurations.
15
- * @requires `tailwindcss` plugin.
16
- * The configuration of `tools.tailwindcss` is provided by `tailwindcss` plugin.
17
- * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
18
- */
19
- tailwindcss?: Tailwindcss;
20
- /**
21
- * Used to custom Jest configurations.
22
- * @requires `test` plugin.
23
- * The configuration of `tools.jest` is provided by `test` plugin.
24
- * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
25
- */
26
- jest?: JestConfig | ((jestConfig: JestConfig) => JestConfig);
27
- /**
28
- * Used to custom SWC configurations.
29
- * @requires `swc` plugin.
30
- * The configuration of `swc` is provided by `swc` plugin.
31
- * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
32
- */
33
- swc?: PluginSwcOptions<'outer'>;
13
+ /**
14
+ * Used to custom Tailwind CSS configurations.
15
+ * @requires `tailwindcss` plugin.
16
+ * The configuration of `tools.tailwindcss` is provided by `tailwindcss` plugin.
17
+ * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
18
+ */
19
+ tailwindcss?: Tailwindcss;
20
+ /**
21
+ * Used to custom Jest configurations.
22
+ * @requires `test` plugin.
23
+ * The configuration of `tools.jest` is provided by `test` plugin.
24
+ * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
25
+ */
26
+ jest?: JestConfig | ((jestConfig: JestConfig) => JestConfig);
27
+ /**
28
+ * Used to custom SWC configurations.
29
+ * @requires `swc` plugin.
30
+ * The configuration of `swc` is provided by `swc` plugin.
31
+ * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
32
+ */
33
+ swc?: PluginSwcOptions<'outer'>;
34
+ }
35
+ export interface ToolsUserConfig extends BuilderToolsConfig, SharedToolsConfig {
36
+ }
37
+ export interface RsToolsUserConfig extends SharedToolsConfig, RsBuilderToolsConfig {
34
38
  }
35
- export interface ToolsUserConfig extends BuilderToolsConfig, SharedToolsConfig {}
36
- export interface RsToolsUserConfig extends SharedToolsConfig, RsBuilderToolsConfig {}