@bleedingdev/modern-js-builder 3.4.0-ultramodern.1 → 3.4.0-ultramodern.2
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/plugins/rspack21.js +61 -0
- package/dist/cjs/shared/parseCommonConfig.js +10 -3
- package/dist/esm/plugins/rspack21.mjs +23 -0
- package/dist/esm/shared/parseCommonConfig.mjs +10 -3
- package/dist/esm-node/plugins/rspack21.mjs +24 -0
- package/dist/esm-node/shared/parseCommonConfig.mjs +10 -3
- package/dist/types/plugins/rspack21.d.ts +4 -0
- package/dist/types/types.d.ts +15 -0
- package/package.json +7 -7
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
const PERSISTENT_CACHE_MAX_AGE = 604800;
|
|
31
|
+
const PERSISTENT_CACHE_MAX_VERSIONS = 3;
|
|
32
|
+
const pluginRspack21 = ({ sourceImport } = {})=>({
|
|
33
|
+
name: 'modern-js:rspack-2-1-defaults',
|
|
34
|
+
setup (api) {
|
|
35
|
+
api.modifyRspackConfig((config)=>{
|
|
36
|
+
config.module ??= {};
|
|
37
|
+
config.module.parser ??= {};
|
|
38
|
+
config.module.parser.javascript ??= {};
|
|
39
|
+
config.module.parser.javascript.createRequire ??= true;
|
|
40
|
+
if ('object' == typeof config.cache && null !== config.cache && 'persistent' === config.cache.type) {
|
|
41
|
+
config.cache.maxAge ??= PERSISTENT_CACHE_MAX_AGE;
|
|
42
|
+
config.cache.maxVersions ??= PERSISTENT_CACHE_MAX_VERSIONS;
|
|
43
|
+
}
|
|
44
|
+
if (void 0 !== sourceImport) {
|
|
45
|
+
config.experiments ??= {};
|
|
46
|
+
config.experiments.sourceImport = sourceImport;
|
|
47
|
+
}
|
|
48
|
+
return config;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
__webpack_require__.d(__webpack_exports__, {}, {
|
|
53
|
+
pluginRspack21: pluginRspack21
|
|
54
|
+
});
|
|
55
|
+
exports.pluginRspack21 = __webpack_exports__.pluginRspack21;
|
|
56
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
57
|
+
"pluginRspack21"
|
|
58
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
59
|
+
Object.defineProperty(exports, '__esModule', {
|
|
60
|
+
value: true
|
|
61
|
+
});
|
|
@@ -41,6 +41,7 @@ const emitRouteFile_js_namespaceObject = require("../plugins/emitRouteFile.js");
|
|
|
41
41
|
const environmentDefaults_js_namespaceObject = require("../plugins/environmentDefaults.js");
|
|
42
42
|
const globalVars_js_namespaceObject = require("../plugins/globalVars.js");
|
|
43
43
|
const htmlMinify_js_namespaceObject = require("../plugins/htmlMinify.js");
|
|
44
|
+
const rspack21_js_namespaceObject = require("../plugins/rspack21.js");
|
|
44
45
|
const runtimeChunk_js_namespaceObject = require("../plugins/runtimeChunk.js");
|
|
45
46
|
const external_devServer_js_namespaceObject = require("./devServer.js");
|
|
46
47
|
const external_tsgo_js_namespaceObject = require("./tsgo.js");
|
|
@@ -59,7 +60,7 @@ function removeUndefinedKey(obj) {
|
|
|
59
60
|
}
|
|
60
61
|
async function parseCommonConfig(builderConfig, options) {
|
|
61
62
|
const frameworkConfigPath = options?.frameworkConfigPath;
|
|
62
|
-
const { plugins: [...plugins] = [], splitChunks, performance: { rsdoctor: rsdoctorConfig, ...performanceConfig } = {}, output: { module = false, enableCssModuleTSDeclaration, disableCssModuleExtension, disableTsChecker, disableSvgr, svgDefaultExport, assetsRetry, enableAssetManifest, sourceMap, convertToRem, polyfill, dataUriLimit = 10000, distPath = {}, ...outputConfig } = {}, html: { outputStructure, appIcon, ...htmlConfig } = {}, source: { alias, globalVars, transformImport, ...sourceConfig } = {}, dev = {}, server = {}, security: { checkSyntax, sri, ...securityConfig } = {}, tools: { devServer, tsChecker, minifyCss, less, sass, htmlPlugin, autoprefixer, ...toolsConfig } = {}, environments = {}, resolve = {} } = builderConfig;
|
|
63
|
+
const { plugins: [...plugins] = [], splitChunks, performance: { rsdoctor: rsdoctorConfig, ...performanceConfig } = {}, output: { module = false, enableCssModuleTSDeclaration, disableCssModuleExtension, disableTsChecker, disableSvgr, svgDefaultExport, assetsRetry, enableAssetManifest, sourceMap, convertToRem, polyfill, dataUriLimit = 10000, distPath = {}, ...outputConfig } = {}, html: { outputStructure, appIcon, ...htmlConfig } = {}, source: { alias, globalVars, transformImport, reactCompiler, ...sourceConfig } = {}, dev = {}, server = {}, security: { checkSyntax, sri, ...securityConfig } = {}, tools: { devServer, tsChecker, minifyCss, less, sass, htmlPlugin, autoprefixer, ...toolsConfig } = {}, environments = {}, resolve = {} } = builderConfig;
|
|
63
64
|
let combinedAlias;
|
|
64
65
|
if (alias || resolve.alias) combinedAlias = [].concat(alias ?? []).concat(resolve.alias ?? []);
|
|
65
66
|
const rsbuildConfig = {
|
|
@@ -135,7 +136,11 @@ async function parseCommonConfig(builderConfig, options) {
|
|
|
135
136
|
rsbuildConfig.dev = removeUndefinedKey(rsbuildDev);
|
|
136
137
|
rsbuildConfig.html = html;
|
|
137
138
|
rsbuildConfig.output = output;
|
|
139
|
+
const { sourceBuild, sourceImport } = builderConfig.experiments || {};
|
|
138
140
|
const rsbuildPlugins = [
|
|
141
|
+
(0, rspack21_js_namespaceObject.pluginRspack21)({
|
|
142
|
+
sourceImport
|
|
143
|
+
}),
|
|
139
144
|
(0, globalVars_js_namespaceObject.pluginGlobalVars)(globalVars),
|
|
140
145
|
(0, devtools_js_namespaceObject.pluginDevtool)({
|
|
141
146
|
sourceMap
|
|
@@ -169,16 +174,18 @@ async function parseCommonConfig(builderConfig, options) {
|
|
|
169
174
|
rsbuildPlugins.push(pluginTypedCSSModules());
|
|
170
175
|
}
|
|
171
176
|
rsbuildPlugins.push((0, runtimeChunk_js_namespaceObject.pluginRuntimeChunk)(builderConfig.output?.disableInlineRuntimeChunk));
|
|
172
|
-
const { sourceBuild } = builderConfig.experiments || {};
|
|
173
177
|
if (sourceBuild) {
|
|
174
178
|
const { pluginSourceBuild } = await import("@rsbuild/plugin-source-build");
|
|
175
179
|
rsbuildPlugins.push(pluginSourceBuild(true === sourceBuild ? {} : sourceBuild));
|
|
176
180
|
}
|
|
177
|
-
rsbuildPlugins.push((0, plugin_react_namespaceObject.pluginReact)(
|
|
181
|
+
rsbuildPlugins.push((0, plugin_react_namespaceObject.pluginReact)({
|
|
182
|
+
reactCompiler: reactCompiler ?? true
|
|
183
|
+
}));
|
|
178
184
|
if (!disableSvgr) {
|
|
179
185
|
const { pluginSvgr } = await import("@rsbuild/plugin-svgr");
|
|
180
186
|
rsbuildPlugins.push(pluginSvgr({
|
|
181
187
|
mixedImport: true,
|
|
188
|
+
parallel: true,
|
|
182
189
|
svgrOptions: {
|
|
183
190
|
exportType: 'component' === svgDefaultExport ? 'default' : 'named'
|
|
184
191
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const PERSISTENT_CACHE_MAX_AGE = 604800;
|
|
2
|
+
const PERSISTENT_CACHE_MAX_VERSIONS = 3;
|
|
3
|
+
const pluginRspack21 = ({ sourceImport } = {})=>({
|
|
4
|
+
name: 'modern-js:rspack-2-1-defaults',
|
|
5
|
+
setup (api) {
|
|
6
|
+
api.modifyRspackConfig((config)=>{
|
|
7
|
+
config.module ??= {};
|
|
8
|
+
config.module.parser ??= {};
|
|
9
|
+
config.module.parser.javascript ??= {};
|
|
10
|
+
config.module.parser.javascript.createRequire ??= true;
|
|
11
|
+
if ('object' == typeof config.cache && null !== config.cache && 'persistent' === config.cache.type) {
|
|
12
|
+
config.cache.maxAge ??= PERSISTENT_CACHE_MAX_AGE;
|
|
13
|
+
config.cache.maxVersions ??= PERSISTENT_CACHE_MAX_VERSIONS;
|
|
14
|
+
}
|
|
15
|
+
if (void 0 !== sourceImport) {
|
|
16
|
+
config.experiments ??= {};
|
|
17
|
+
config.experiments.sourceImport = sourceImport;
|
|
18
|
+
}
|
|
19
|
+
return config;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
export { pluginRspack21 };
|
|
@@ -8,6 +8,7 @@ import { pluginEmitRouteFile } from "../plugins/emitRouteFile.mjs";
|
|
|
8
8
|
import { pluginEnvironmentDefaults } from "../plugins/environmentDefaults.mjs";
|
|
9
9
|
import { pluginGlobalVars } from "../plugins/globalVars.mjs";
|
|
10
10
|
import { pluginHtmlMinifierTerser } from "../plugins/htmlMinify.mjs";
|
|
11
|
+
import { pluginRspack21 } from "../plugins/rspack21.mjs";
|
|
11
12
|
import { pluginRuntimeChunk } from "../plugins/runtimeChunk.mjs";
|
|
12
13
|
import { transformToRsbuildServerOptions } from "./devServer.mjs";
|
|
13
14
|
import { withTsgoDefaults } from "./tsgo.mjs";
|
|
@@ -26,7 +27,7 @@ function removeUndefinedKey(obj) {
|
|
|
26
27
|
}
|
|
27
28
|
async function parseCommonConfig(builderConfig, options) {
|
|
28
29
|
const frameworkConfigPath = options?.frameworkConfigPath;
|
|
29
|
-
const { plugins: [...plugins] = [], splitChunks, performance: { rsdoctor: rsdoctorConfig, ...performanceConfig } = {}, output: { module = false, enableCssModuleTSDeclaration, disableCssModuleExtension, disableTsChecker, disableSvgr, svgDefaultExport, assetsRetry, enableAssetManifest, sourceMap, convertToRem, polyfill, dataUriLimit = 10000, distPath = {}, ...outputConfig } = {}, html: { outputStructure, appIcon, ...htmlConfig } = {}, source: { alias, globalVars, transformImport, ...sourceConfig } = {}, dev = {}, server = {}, security: { checkSyntax, sri, ...securityConfig } = {}, tools: { devServer, tsChecker, minifyCss, less, sass, htmlPlugin, autoprefixer, ...toolsConfig } = {}, environments = {}, resolve = {} } = builderConfig;
|
|
30
|
+
const { plugins: [...plugins] = [], splitChunks, performance: { rsdoctor: rsdoctorConfig, ...performanceConfig } = {}, output: { module = false, enableCssModuleTSDeclaration, disableCssModuleExtension, disableTsChecker, disableSvgr, svgDefaultExport, assetsRetry, enableAssetManifest, sourceMap, convertToRem, polyfill, dataUriLimit = 10000, distPath = {}, ...outputConfig } = {}, html: { outputStructure, appIcon, ...htmlConfig } = {}, source: { alias, globalVars, transformImport, reactCompiler, ...sourceConfig } = {}, dev = {}, server = {}, security: { checkSyntax, sri, ...securityConfig } = {}, tools: { devServer, tsChecker, minifyCss, less, sass, htmlPlugin, autoprefixer, ...toolsConfig } = {}, environments = {}, resolve = {} } = builderConfig;
|
|
30
31
|
let combinedAlias;
|
|
31
32
|
if (alias || resolve.alias) combinedAlias = [].concat(alias ?? []).concat(resolve.alias ?? []);
|
|
32
33
|
const rsbuildConfig = {
|
|
@@ -102,7 +103,11 @@ async function parseCommonConfig(builderConfig, options) {
|
|
|
102
103
|
rsbuildConfig.dev = removeUndefinedKey(rsbuildDev);
|
|
103
104
|
rsbuildConfig.html = html;
|
|
104
105
|
rsbuildConfig.output = output;
|
|
106
|
+
const { sourceBuild, sourceImport } = builderConfig.experiments || {};
|
|
105
107
|
const rsbuildPlugins = [
|
|
108
|
+
pluginRspack21({
|
|
109
|
+
sourceImport
|
|
110
|
+
}),
|
|
106
111
|
pluginGlobalVars(globalVars),
|
|
107
112
|
pluginDevtool({
|
|
108
113
|
sourceMap
|
|
@@ -136,16 +141,18 @@ async function parseCommonConfig(builderConfig, options) {
|
|
|
136
141
|
rsbuildPlugins.push(pluginTypedCSSModules());
|
|
137
142
|
}
|
|
138
143
|
rsbuildPlugins.push(pluginRuntimeChunk(builderConfig.output?.disableInlineRuntimeChunk));
|
|
139
|
-
const { sourceBuild } = builderConfig.experiments || {};
|
|
140
144
|
if (sourceBuild) {
|
|
141
145
|
const { pluginSourceBuild } = await import("@rsbuild/plugin-source-build");
|
|
142
146
|
rsbuildPlugins.push(pluginSourceBuild(true === sourceBuild ? {} : sourceBuild));
|
|
143
147
|
}
|
|
144
|
-
rsbuildPlugins.push(pluginReact(
|
|
148
|
+
rsbuildPlugins.push(pluginReact({
|
|
149
|
+
reactCompiler: reactCompiler ?? true
|
|
150
|
+
}));
|
|
145
151
|
if (!disableSvgr) {
|
|
146
152
|
const { pluginSvgr } = await import("@rsbuild/plugin-svgr");
|
|
147
153
|
rsbuildPlugins.push(pluginSvgr({
|
|
148
154
|
mixedImport: true,
|
|
155
|
+
parallel: true,
|
|
149
156
|
svgrOptions: {
|
|
150
157
|
exportType: 'component' === svgDefaultExport ? 'default' : 'named'
|
|
151
158
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "node:module";
|
|
2
|
+
const PERSISTENT_CACHE_MAX_AGE = 604800;
|
|
3
|
+
const PERSISTENT_CACHE_MAX_VERSIONS = 3;
|
|
4
|
+
const pluginRspack21 = ({ sourceImport } = {})=>({
|
|
5
|
+
name: 'modern-js:rspack-2-1-defaults',
|
|
6
|
+
setup (api) {
|
|
7
|
+
api.modifyRspackConfig((config)=>{
|
|
8
|
+
config.module ??= {};
|
|
9
|
+
config.module.parser ??= {};
|
|
10
|
+
config.module.parser.javascript ??= {};
|
|
11
|
+
config.module.parser.javascript.createRequire ??= true;
|
|
12
|
+
if ('object' == typeof config.cache && null !== config.cache && 'persistent' === config.cache.type) {
|
|
13
|
+
config.cache.maxAge ??= PERSISTENT_CACHE_MAX_AGE;
|
|
14
|
+
config.cache.maxVersions ??= PERSISTENT_CACHE_MAX_VERSIONS;
|
|
15
|
+
}
|
|
16
|
+
if (void 0 !== sourceImport) {
|
|
17
|
+
config.experiments ??= {};
|
|
18
|
+
config.experiments.sourceImport = sourceImport;
|
|
19
|
+
}
|
|
20
|
+
return config;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export { pluginRspack21 };
|
|
@@ -9,6 +9,7 @@ import { pluginEmitRouteFile } from "../plugins/emitRouteFile.mjs";
|
|
|
9
9
|
import { pluginEnvironmentDefaults } from "../plugins/environmentDefaults.mjs";
|
|
10
10
|
import { pluginGlobalVars } from "../plugins/globalVars.mjs";
|
|
11
11
|
import { pluginHtmlMinifierTerser } from "../plugins/htmlMinify.mjs";
|
|
12
|
+
import { pluginRspack21 } from "../plugins/rspack21.mjs";
|
|
12
13
|
import { pluginRuntimeChunk } from "../plugins/runtimeChunk.mjs";
|
|
13
14
|
import { transformToRsbuildServerOptions } from "./devServer.mjs";
|
|
14
15
|
import { withTsgoDefaults } from "./tsgo.mjs";
|
|
@@ -27,7 +28,7 @@ function removeUndefinedKey(obj) {
|
|
|
27
28
|
}
|
|
28
29
|
async function parseCommonConfig(builderConfig, options) {
|
|
29
30
|
const frameworkConfigPath = options?.frameworkConfigPath;
|
|
30
|
-
const { plugins: [...plugins] = [], splitChunks, performance: { rsdoctor: rsdoctorConfig, ...performanceConfig } = {}, output: { module = false, enableCssModuleTSDeclaration, disableCssModuleExtension, disableTsChecker, disableSvgr, svgDefaultExport, assetsRetry, enableAssetManifest, sourceMap, convertToRem, polyfill, dataUriLimit = 10000, distPath = {}, ...outputConfig } = {}, html: { outputStructure, appIcon, ...htmlConfig } = {}, source: { alias, globalVars, transformImport, ...sourceConfig } = {}, dev = {}, server = {}, security: { checkSyntax, sri, ...securityConfig } = {}, tools: { devServer, tsChecker, minifyCss, less, sass, htmlPlugin, autoprefixer, ...toolsConfig } = {}, environments = {}, resolve = {} } = builderConfig;
|
|
31
|
+
const { plugins: [...plugins] = [], splitChunks, performance: { rsdoctor: rsdoctorConfig, ...performanceConfig } = {}, output: { module = false, enableCssModuleTSDeclaration, disableCssModuleExtension, disableTsChecker, disableSvgr, svgDefaultExport, assetsRetry, enableAssetManifest, sourceMap, convertToRem, polyfill, dataUriLimit = 10000, distPath = {}, ...outputConfig } = {}, html: { outputStructure, appIcon, ...htmlConfig } = {}, source: { alias, globalVars, transformImport, reactCompiler, ...sourceConfig } = {}, dev = {}, server = {}, security: { checkSyntax, sri, ...securityConfig } = {}, tools: { devServer, tsChecker, minifyCss, less, sass, htmlPlugin, autoprefixer, ...toolsConfig } = {}, environments = {}, resolve = {} } = builderConfig;
|
|
31
32
|
let combinedAlias;
|
|
32
33
|
if (alias || resolve.alias) combinedAlias = [].concat(alias ?? []).concat(resolve.alias ?? []);
|
|
33
34
|
const rsbuildConfig = {
|
|
@@ -103,7 +104,11 @@ async function parseCommonConfig(builderConfig, options) {
|
|
|
103
104
|
rsbuildConfig.dev = removeUndefinedKey(rsbuildDev);
|
|
104
105
|
rsbuildConfig.html = html;
|
|
105
106
|
rsbuildConfig.output = output;
|
|
107
|
+
const { sourceBuild, sourceImport } = builderConfig.experiments || {};
|
|
106
108
|
const rsbuildPlugins = [
|
|
109
|
+
pluginRspack21({
|
|
110
|
+
sourceImport
|
|
111
|
+
}),
|
|
107
112
|
pluginGlobalVars(globalVars),
|
|
108
113
|
pluginDevtool({
|
|
109
114
|
sourceMap
|
|
@@ -137,16 +142,18 @@ async function parseCommonConfig(builderConfig, options) {
|
|
|
137
142
|
rsbuildPlugins.push(pluginTypedCSSModules());
|
|
138
143
|
}
|
|
139
144
|
rsbuildPlugins.push(pluginRuntimeChunk(builderConfig.output?.disableInlineRuntimeChunk));
|
|
140
|
-
const { sourceBuild } = builderConfig.experiments || {};
|
|
141
145
|
if (sourceBuild) {
|
|
142
146
|
const { pluginSourceBuild } = await import("@rsbuild/plugin-source-build");
|
|
143
147
|
rsbuildPlugins.push(pluginSourceBuild(true === sourceBuild ? {} : sourceBuild));
|
|
144
148
|
}
|
|
145
|
-
rsbuildPlugins.push(pluginReact(
|
|
149
|
+
rsbuildPlugins.push(pluginReact({
|
|
150
|
+
reactCompiler: reactCompiler ?? true
|
|
151
|
+
}));
|
|
146
152
|
if (!disableSvgr) {
|
|
147
153
|
const { pluginSvgr } = await import("@rsbuild/plugin-svgr");
|
|
148
154
|
rsbuildPlugins.push(pluginSvgr({
|
|
149
155
|
mixedImport: true,
|
|
156
|
+
parallel: true,
|
|
150
157
|
svgrOptions: {
|
|
151
158
|
exportType: 'component' === svgDefaultExport ? 'default' : 'named'
|
|
152
159
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { PluginAssetsRetryOptions } from '@rsbuild/plugin-assets-retry';
|
|
|
4
4
|
import type { PluginCheckSyntaxOptions } from '@rsbuild/plugin-check-syntax';
|
|
5
5
|
import type { PluginCssMinimizerOptions } from '@rsbuild/plugin-css-minimizer';
|
|
6
6
|
import type { PluginLessOptions } from '@rsbuild/plugin-less';
|
|
7
|
+
import type { PluginReactOptions } from '@rsbuild/plugin-react';
|
|
7
8
|
import type { PluginRemOptions } from '@rsbuild/plugin-rem';
|
|
8
9
|
import type { PluginSassOptions } from '@rsbuild/plugin-sass';
|
|
9
10
|
import type { PluginSourceBuildOptions } from '@rsbuild/plugin-source-build';
|
|
@@ -146,6 +147,16 @@ export type BuilderExtraConfig = {
|
|
|
146
147
|
* Define global variables. It can replace expressions like `process.env.FOO` in your code after compile.
|
|
147
148
|
*/
|
|
148
149
|
globalVars?: ChainedGlobalVars;
|
|
150
|
+
/**
|
|
151
|
+
* Enable or configure the Rust-backed React Compiler transform.
|
|
152
|
+
*
|
|
153
|
+
* The transform is enabled by default through Rsbuild's SWC integration.
|
|
154
|
+
* Set this to `false` to disable it.
|
|
155
|
+
*
|
|
156
|
+
* For React 17 or 18, install `react-compiler-runtime` and set the
|
|
157
|
+
* matching target version, for example `{ target: '18' }`.
|
|
158
|
+
*/
|
|
159
|
+
reactCompiler?: PluginReactOptions['reactCompiler'];
|
|
149
160
|
};
|
|
150
161
|
output?: {
|
|
151
162
|
/**
|
|
@@ -207,6 +218,10 @@ export type BuilderExtraConfig = {
|
|
|
207
218
|
* Enable the ability for source code building
|
|
208
219
|
*/
|
|
209
220
|
sourceBuild?: boolean | Pick<PluginSourceBuildOptions, 'sourceField' | 'resolvePriority'>;
|
|
221
|
+
/**
|
|
222
|
+
* Configure Rspack source phase imports for WebAssembly modules.
|
|
223
|
+
*/
|
|
224
|
+
sourceImport?: boolean;
|
|
210
225
|
};
|
|
211
226
|
};
|
|
212
227
|
export type SriOptions = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bleedingdev/modern-js-builder",
|
|
3
|
-
"version": "3.4.0-ultramodern.
|
|
3
|
+
"version": "3.4.0-ultramodern.2",
|
|
4
4
|
"description": "A builder for Modern.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@rsbuild/core": "2.0
|
|
29
|
+
"@rsbuild/core": "2.1.0",
|
|
30
30
|
"@rsbuild/plugin-assets-retry": "2.0.1",
|
|
31
31
|
"@rsbuild/plugin-check-syntax": "2.0.0",
|
|
32
32
|
"@rsbuild/plugin-css-minimizer": "2.0.1",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"@rsbuild/plugin-sass": "2.0.0",
|
|
37
37
|
"@rsbuild/plugin-source-build": "1.0.6",
|
|
38
38
|
"@rsbuild/plugin-svgr": "2.0.4",
|
|
39
|
-
"@rsbuild/plugin-type-check": "1.
|
|
39
|
+
"@rsbuild/plugin-type-check": "1.5.0",
|
|
40
40
|
"@rsbuild/plugin-typed-css-modules": "1.2.4",
|
|
41
41
|
"@rsdoctor/rspack-plugin": "^1.5.16",
|
|
42
42
|
"@swc/core": "1.15.43",
|
|
43
43
|
"@swc/helpers": "^0.5.23",
|
|
44
44
|
"@typescript/native-preview": "7.0.0-dev.20260624.1",
|
|
45
|
-
"autoprefixer": "10.5.
|
|
45
|
+
"autoprefixer": "10.5.2",
|
|
46
46
|
"browserslist": "4.28.4",
|
|
47
47
|
"core-js": "^3.49.0",
|
|
48
48
|
"cssnano": "8.0.2",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"rsbuild-plugin-rsc": "0.1.1",
|
|
60
60
|
"rspack-manifest-plugin": "5.2.2",
|
|
61
61
|
"ts-deepmerge": "8.0.0",
|
|
62
|
-
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.4.0-ultramodern.
|
|
62
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.4.0-ultramodern.2"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@rslib/core": "0.23.0",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"react": "^19.2.7",
|
|
69
69
|
"terser": "^5.48.0",
|
|
70
70
|
"typescript": "^6.0.3",
|
|
71
|
-
"@
|
|
72
|
-
"@
|
|
71
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.4.0-ultramodern.2",
|
|
72
|
+
"@scripts/rstest-config": "2.66.0"
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public",
|