@bleedingdev/modern-js-builder 3.2.0-ultramodern.99 → 3.4.0-ultramodern.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.
- package/dist/cjs/createBuilder.js +13 -7
- package/dist/cjs/index.js +9 -5
- package/dist/cjs/plugins/devtools.js +12 -8
- package/dist/cjs/plugins/emitRouteFile.js +9 -5
- package/dist/cjs/plugins/environmentDefaults.js +9 -5
- package/dist/cjs/plugins/globalVars.js +9 -5
- package/dist/cjs/plugins/htmlMinify.js +9 -5
- package/dist/cjs/plugins/manifest.js +9 -5
- package/dist/cjs/plugins/postcss.js +16 -49
- package/dist/cjs/plugins/rscConfig.js +13 -6
- package/dist/cjs/plugins/rsdoctor.js +12 -8
- package/dist/cjs/plugins/runtimeChunk.js +9 -5
- package/dist/cjs/rsdoctorConfig.js +18 -0
- package/dist/cjs/shared/devServer.js +9 -5
- package/dist/cjs/shared/getCssSupport.js +9 -5
- package/dist/cjs/shared/manifest.js +12 -8
- package/dist/cjs/shared/parseCommonConfig.js +23 -11
- package/dist/cjs/shared/rsc/rsc-server-entry-loader.js +12 -8
- package/dist/cjs/shared/rsc/rscClientBrowserFallback.js +9 -5
- package/dist/cjs/shared/rsc/rscEmptyModule.js +12 -8
- package/dist/cjs/shared/tsgo.js +76 -0
- package/dist/cjs/shared/utils.js +9 -5
- package/dist/esm/createBuilder.mjs +4 -2
- package/dist/esm/plugins/postcss.mjs +5 -45
- package/dist/esm/plugins/rscConfig.mjs +4 -1
- package/dist/esm/rsdoctorConfig.mjs +0 -0
- package/dist/esm/shared/parseCommonConfig.mjs +14 -6
- package/dist/esm/shared/tsgo.mjs +35 -0
- package/dist/esm-node/createBuilder.mjs +4 -2
- package/dist/esm-node/plugins/postcss.mjs +5 -45
- package/dist/esm-node/plugins/rscConfig.mjs +4 -1
- package/dist/esm-node/rsdoctorConfig.mjs +1 -0
- package/dist/esm-node/shared/parseCommonConfig.mjs +14 -6
- package/dist/esm-node/shared/tsgo.mjs +36 -0
- package/dist/types/plugins/postcss.d.ts +1 -0
- package/dist/types/plugins/rscConfig.d.ts +10 -1
- package/dist/types/plugins/rsdoctor.d.ts +1 -1
- package/dist/types/rsdoctorConfig.d.ts +12 -0
- package/dist/types/shared/parseCommonConfig.d.ts +2 -1
- package/dist/types/shared/tsgo.d.ts +12 -0
- package/dist/types/types.d.ts +27 -14
- package/package.json +27 -27
package/dist/types/types.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ import type { PluginSourceBuildOptions } from '@rsbuild/plugin-source-build';
|
|
|
10
10
|
import type { SvgDefaultExport } from '@rsbuild/plugin-svgr';
|
|
11
11
|
import type { PluginTypeCheckerOptions } from '@rsbuild/plugin-type-check';
|
|
12
12
|
import type { Options as AutoprefixerOptions } from 'autoprefixer';
|
|
13
|
+
import type { RsdoctorUserConfig } from './rsdoctorConfig';
|
|
14
|
+
export type { RsdoctorUserConfig } from './rsdoctorConfig';
|
|
13
15
|
export type CacheGroup = Rspack.OptimizationSplitChunksCacheGroup;
|
|
14
16
|
export type Stats = Omit<Rspack.Stats, '#private' | 'hash' | 'startTime' | 'endTime'>;
|
|
15
17
|
export type RspackConfig = Rspack.Configuration;
|
|
@@ -79,18 +81,6 @@ export type ToolsDevServerConfig = ConfigChain<{
|
|
|
79
81
|
watch?: boolean;
|
|
80
82
|
}>;
|
|
81
83
|
export type ToolsAutoprefixerConfig = ConfigChain<AutoprefixerOptions>;
|
|
82
|
-
export type RsdoctorUserConfig = boolean | {
|
|
83
|
-
/**
|
|
84
|
-
* Force enable / disable Rsdoctor.
|
|
85
|
-
* By default, Modern.js enables Rsdoctor in production builds.
|
|
86
|
-
*/
|
|
87
|
-
enabled?: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Disable Rsdoctor client server and ensure build process exits after report generation.
|
|
90
|
-
* @default true
|
|
91
|
-
*/
|
|
92
|
-
disableClientServer?: boolean;
|
|
93
|
-
};
|
|
94
84
|
export type BuilderExtraConfig = {
|
|
95
85
|
tools?: {
|
|
96
86
|
/**
|
|
@@ -253,6 +243,30 @@ export type DistPath = DistPathConfig & {
|
|
|
253
243
|
server?: string;
|
|
254
244
|
worker?: string;
|
|
255
245
|
};
|
|
246
|
+
/**
|
|
247
|
+
* RSC (React Server Components) configuration.
|
|
248
|
+
*
|
|
249
|
+
* - `true` / `false`: enable or disable RSC with the default `'server'` and
|
|
250
|
+
* `'client'` environment names.
|
|
251
|
+
* - object form: enable RSC and customize which Rsbuild environments the RSC
|
|
252
|
+
* plugin attaches to. Frameworks whose environment names differ from the
|
|
253
|
+
* defaults (e.g. multi-page builders that already declare their own
|
|
254
|
+
* server/client environments) can map RSC onto those existing environments
|
|
255
|
+
* instead of letting the plugin create new empty `'server'`/`'client'` ones.
|
|
256
|
+
*/
|
|
257
|
+
export type RscConfig = boolean | {
|
|
258
|
+
/**
|
|
259
|
+
* Map the RSC plugin's server/client environments onto existing Rsbuild
|
|
260
|
+
* environment names. Omitted keys fall back to the defaults
|
|
261
|
+
* (`'server'` / `'client'`).
|
|
262
|
+
*/
|
|
263
|
+
environments?: {
|
|
264
|
+
/** Rsbuild environment name for the React Server Components (server) bundle. @default 'server' */
|
|
265
|
+
server?: string;
|
|
266
|
+
/** Rsbuild environment name for the client (browser) bundle. @default 'client' */
|
|
267
|
+
client?: string;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
256
270
|
export type BuilderConfig = {
|
|
257
271
|
dev?: Omit<DevConfig, 'setupMiddlewares'> & {
|
|
258
272
|
server?: {
|
|
@@ -269,7 +283,7 @@ export type BuilderConfig = {
|
|
|
269
283
|
distPath?: DistPath;
|
|
270
284
|
};
|
|
271
285
|
server?: {
|
|
272
|
-
rsc?:
|
|
286
|
+
rsc?: RscConfig;
|
|
273
287
|
port?: number;
|
|
274
288
|
cors?: ServerConfig['cors'];
|
|
275
289
|
};
|
|
@@ -284,4 +298,3 @@ export type BuilderConfig = {
|
|
|
284
298
|
[key: string]: EnvironmentConfig;
|
|
285
299
|
};
|
|
286
300
|
} & BuilderExtraConfig;
|
|
287
|
-
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bleedingdev/modern-js-builder",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0-ultramodern.0",
|
|
4
4
|
"description": "A builder for Modern.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,25 +26,26 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@rsbuild/core": "2.0.
|
|
30
|
-
"@rsbuild/plugin-assets-retry": "2.0.
|
|
31
|
-
"@rsbuild/plugin-check-syntax": "
|
|
32
|
-
"@rsbuild/plugin-css-minimizer": "2.0.
|
|
33
|
-
"@rsbuild/plugin-less": "
|
|
34
|
-
"@rsbuild/plugin-react": "2.
|
|
35
|
-
"@rsbuild/plugin-rem": "1.0.
|
|
36
|
-
"@rsbuild/plugin-sass": "
|
|
37
|
-
"@rsbuild/plugin-source-build": "1.0.
|
|
38
|
-
"@rsbuild/plugin-svgr": "2.0.
|
|
39
|
-
"@rsbuild/plugin-type-check": "1.
|
|
40
|
-
"@rsbuild/plugin-typed-css-modules": "1.2.
|
|
41
|
-
"@rsdoctor/rspack-plugin": "^1.5.
|
|
42
|
-
"@swc/core": "1.15.
|
|
29
|
+
"@rsbuild/core": "2.0.15",
|
|
30
|
+
"@rsbuild/plugin-assets-retry": "2.0.1",
|
|
31
|
+
"@rsbuild/plugin-check-syntax": "2.0.0",
|
|
32
|
+
"@rsbuild/plugin-css-minimizer": "2.0.1",
|
|
33
|
+
"@rsbuild/plugin-less": "2.0.0",
|
|
34
|
+
"@rsbuild/plugin-react": "2.1.0",
|
|
35
|
+
"@rsbuild/plugin-rem": "1.0.6",
|
|
36
|
+
"@rsbuild/plugin-sass": "2.0.0",
|
|
37
|
+
"@rsbuild/plugin-source-build": "1.0.6",
|
|
38
|
+
"@rsbuild/plugin-svgr": "2.0.4",
|
|
39
|
+
"@rsbuild/plugin-type-check": "1.4.0",
|
|
40
|
+
"@rsbuild/plugin-typed-css-modules": "1.2.4",
|
|
41
|
+
"@rsdoctor/rspack-plugin": "^1.5.16",
|
|
42
|
+
"@swc/core": "1.15.43",
|
|
43
43
|
"@swc/helpers": "^0.5.23",
|
|
44
|
-
"
|
|
45
|
-
"
|
|
44
|
+
"@typescript/native-preview": "7.0.0-dev.20260624.1",
|
|
45
|
+
"autoprefixer": "10.5.1",
|
|
46
|
+
"browserslist": "4.28.4",
|
|
46
47
|
"core-js": "^3.49.0",
|
|
47
|
-
"cssnano": "8.0.
|
|
48
|
+
"cssnano": "8.0.2",
|
|
48
49
|
"html-minifier-terser": "^7.2.0",
|
|
49
50
|
"lodash": "^4.18.1",
|
|
50
51
|
"postcss": "^8.5.15",
|
|
@@ -52,23 +53,22 @@
|
|
|
52
53
|
"postcss-flexbugs-fixes": "5.0.2",
|
|
53
54
|
"postcss-font-variant": "5.0.0",
|
|
54
55
|
"postcss-initial": "4.0.1",
|
|
55
|
-
"postcss-load-config": "6.0.1",
|
|
56
56
|
"postcss-media-minmax": "5.0.0",
|
|
57
57
|
"postcss-nesting": "14.0.0",
|
|
58
58
|
"postcss-page-break": "3.0.4",
|
|
59
|
-
"rsbuild-plugin-rsc": "0.1.
|
|
60
|
-
"rspack-manifest-plugin": "5.2.
|
|
59
|
+
"rsbuild-plugin-rsc": "0.1.1",
|
|
60
|
+
"rspack-manifest-plugin": "5.2.2",
|
|
61
61
|
"ts-deepmerge": "8.0.0",
|
|
62
|
-
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.
|
|
62
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.4.0-ultramodern.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@rslib/core": "0.
|
|
65
|
+
"@rslib/core": "0.23.0",
|
|
66
66
|
"@types/html-minifier-terser": "^7.0.2",
|
|
67
67
|
"@types/lodash": "^4.17.24",
|
|
68
|
-
"
|
|
69
|
-
"react": "^19.2.6",
|
|
68
|
+
"react": "^19.2.7",
|
|
70
69
|
"terser": "^5.48.0",
|
|
71
|
-
"
|
|
70
|
+
"typescript": "^6.0.3",
|
|
71
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.4.0-ultramodern.0",
|
|
72
72
|
"@scripts/rstest-config": "2.66.0"
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"registry": "https://registry.npmjs.org/"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
|
-
"build": "rslib build",
|
|
79
|
+
"build": "rslib build && pnpm -w tsgo:dts \"$PWD\"",
|
|
80
80
|
"dev": "rslib build --watch",
|
|
81
81
|
"test": "rstest run",
|
|
82
82
|
"test:watch": "rstest watch"
|