@modern-js/app-tools 3.9.1 → 3.9.3
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/commands/build.js +1 -2
- package/dist/cjs/commands/deploy.js +1 -3
- package/dist/cjs/commands/index.js +4 -0
- package/dist/cjs/compat/hooks.js +1 -1
- package/dist/cjs/index.js +27 -57
- package/dist/cjs/plugins/analyze/getFileSystemEntry.js +1 -1
- package/dist/cjs/plugins/analyze/getServerRoutes.js +1 -1
- package/dist/cjs/plugins/analyze/index.js +2 -2
- package/dist/cjs/plugins/analyze/utils.js +4 -5
- package/dist/cjs/plugins/initialize/index.js +3 -4
- package/dist/esm/commands/build.mjs +1 -2
- package/dist/esm/commands/deploy.mjs +1 -3
- package/dist/esm/commands/index.mjs +4 -0
- package/dist/esm/compat/hooks.mjs +1 -1
- package/dist/esm/index.mjs +2 -12
- package/dist/esm/plugins/analyze/getFileSystemEntry.mjs +1 -1
- package/dist/esm/plugins/analyze/getServerRoutes.mjs +1 -1
- package/dist/esm/plugins/analyze/index.mjs +2 -2
- package/dist/esm/plugins/analyze/utils.mjs +4 -5
- package/dist/esm/plugins/initialize/index.mjs +3 -4
- package/dist/esm-node/commands/build.mjs +1 -2
- package/dist/esm-node/commands/deploy.mjs +1 -3
- package/dist/esm-node/commands/index.mjs +4 -0
- package/dist/esm-node/compat/hooks.mjs +1 -1
- package/dist/esm-node/index.mjs +2 -12
- package/dist/esm-node/plugins/analyze/getFileSystemEntry.mjs +1 -1
- package/dist/esm-node/plugins/analyze/getServerRoutes.mjs +1 -1
- package/dist/esm-node/plugins/analyze/index.mjs +2 -2
- package/dist/esm-node/plugins/analyze/utils.mjs +4 -5
- package/dist/esm-node/plugins/initialize/index.mjs +3 -4
- package/dist/types/index.d.ts +1 -3
- package/dist/types/plugins/analyze/utils.d.ts +1 -1
- package/docs/configure/app/output/disable-svgr.md +4 -0
- package/docs/configure/app/output/svg-default-export.md +4 -0
- package/docs/configure/app/tools/less.md +94 -19
- package/docs/configure/app/tools/sass.md +87 -18
- package/docs/configure/app/tools/svgr.md +89 -0
- package/docs/guides/basic-features/static-assets/svg-assets.md +29 -17
- package/docs/llms.txt +3 -2
- package/docs/plugin/introduction.md +10 -10
- package/package.json +16 -16
- package/dist/cjs/plugins/serverRuntime.js +0 -53
- package/dist/esm/plugins/serverRuntime.mjs +0 -15
- package/dist/esm-node/plugins/serverRuntime.mjs +0 -16
- package/dist/types/plugins/serverRuntime.d.ts +0 -3
|
@@ -126,16 +126,16 @@ You can read [Rsbuild Official Website - Plugins](https://v2.rsbuild.rs/plugins/
|
|
|
126
126
|
|
|
127
127
|
The following are official Rsbuild plugins that are already built into Modern.js. They can be enabled without installation:
|
|
128
128
|
|
|
129
|
-
| Plugin | Description | Modern.js Link
|
|
130
|
-
| -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
131
|
-
| [React Plugin](https://v2.rsbuild.rs/plugins/list/plugin-react) | Provides support for React | -
|
|
132
|
-
| [SVGR Plugin](https://v2.rsbuild.rs/plugins/list/plugin-svgr) | Supports converting SVG images into React components | [
|
|
133
|
-
| [Assets Retry Plugin](https://github.com/rstackjs/rsbuild-plugin-assets-retry) | Automatically retries requests when static asset loading fails | [output.assetsRetry](/configure/app/output/assets-retry.md)
|
|
134
|
-
| [Type Check Plugin](https://github.com/rstackjs/rsbuild-plugin-type-check) | Runs TypeScript type checking in a separate process | [output.disableTsChecker](/configure/app/output/disable-ts-checker.md)<br />[tools.tsChecker](/configure/app/tools/ts-checker.md)
|
|
135
|
-
| [Source Build Plugin](https://github.com/rstackjs/rsbuild-plugin-source-build) | For monorepo scenarios, supports referencing source code from other subdirectories and completing builds and hot updates | [experiments.sourceBuild](/configure/app/experiments/source-build.md)
|
|
136
|
-
| [Check Syntax Plugin](https://github.com/rstackjs/rsbuild-plugin-check-syntax) | Analyzes the syntax compatibility of the build artifacts to determine if there are any advanced syntax features that cause compatibility issues | [security.checkSyntax](/configure/app/security/check-syntax.md)
|
|
137
|
-
| [CSS Minimizer Plugin](https://github.com/rstackjs/rsbuild-plugin-css-minimizer) | Used to customize the CSS compression tool, switch to [cssnano](https://cssnano.co/) or other tools for CSS compression | [tools.minifyCss](/configure/app/tools/minify-css.md)
|
|
138
|
-
| [Rem Plugin](https://github.com/rstackjs/rsbuild-plugin-rem) | Implements rem adaptive layout for mobile pages | [output.convertToRem](/configure/app/output/convert-to-rem.md)
|
|
129
|
+
| Plugin | Description | Modern.js Link |
|
|
130
|
+
| -------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
131
|
+
| [React Plugin](https://v2.rsbuild.rs/plugins/list/plugin-react) | Provides support for React | - |
|
|
132
|
+
| [SVGR Plugin](https://v2.rsbuild.rs/plugins/list/plugin-svgr) | Supports converting SVG images into React components | [tools.svgr](/configure/app/tools/svgr.md) |
|
|
133
|
+
| [Assets Retry Plugin](https://github.com/rstackjs/rsbuild-plugin-assets-retry) | Automatically retries requests when static asset loading fails | [output.assetsRetry](/configure/app/output/assets-retry.md) |
|
|
134
|
+
| [Type Check Plugin](https://github.com/rstackjs/rsbuild-plugin-type-check) | Runs TypeScript type checking in a separate process | [output.disableTsChecker](/configure/app/output/disable-ts-checker.md)<br />[tools.tsChecker](/configure/app/tools/ts-checker.md) |
|
|
135
|
+
| [Source Build Plugin](https://github.com/rstackjs/rsbuild-plugin-source-build) | For monorepo scenarios, supports referencing source code from other subdirectories and completing builds and hot updates | [experiments.sourceBuild](/configure/app/experiments/source-build.md) |
|
|
136
|
+
| [Check Syntax Plugin](https://github.com/rstackjs/rsbuild-plugin-check-syntax) | Analyzes the syntax compatibility of the build artifacts to determine if there are any advanced syntax features that cause compatibility issues | [security.checkSyntax](/configure/app/security/check-syntax.md) |
|
|
137
|
+
| [CSS Minimizer Plugin](https://github.com/rstackjs/rsbuild-plugin-css-minimizer) | Used to customize the CSS compression tool, switch to [cssnano](https://cssnano.co/) or other tools for CSS compression | [tools.minifyCss](/configure/app/tools/minify-css.md) |
|
|
138
|
+
| [Rem Plugin](https://github.com/rstackjs/rsbuild-plugin-rem) | Implements rem adaptive layout for mobile pages | [output.convertToRem](/configure/app/output/convert-to-rem.md) |
|
|
139
139
|
|
|
140
140
|
#### Plugins Not Built-in
|
|
141
141
|
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.9.
|
|
18
|
+
"version": "3.9.3",
|
|
19
19
|
"types": "./dist/types/index.d.ts",
|
|
20
20
|
"main": "./dist/cjs/index.js",
|
|
21
21
|
"exports": {
|
|
@@ -113,10 +113,10 @@
|
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
"dependencies": {
|
|
116
|
-
"@babel/parser": "^7.29.
|
|
117
|
-
"@babel/traverse": "^7.29.
|
|
118
|
-
"@babel/types": "^7.29.
|
|
119
|
-
"@rsbuild/core": "2.2.
|
|
116
|
+
"@babel/parser": "^7.29.9",
|
|
117
|
+
"@babel/traverse": "^7.29.8",
|
|
118
|
+
"@babel/types": "^7.29.8",
|
|
119
|
+
"@rsbuild/core": "2.2.9",
|
|
120
120
|
"@swc/core": "1.15.41",
|
|
121
121
|
"@swc/helpers": "^0.5.17",
|
|
122
122
|
"es-module-lexer": "^1.7.0",
|
|
@@ -126,19 +126,19 @@
|
|
|
126
126
|
"ndepe": "^0.1.13",
|
|
127
127
|
"pkg-types": "^1.3.1",
|
|
128
128
|
"std-env": "^3.10.0",
|
|
129
|
-
"@modern-js/builder": "3.9.
|
|
130
|
-
"@modern-js/i18n-utils": "3.9.
|
|
131
|
-
"@modern-js/plugin": "3.9.
|
|
132
|
-
"@modern-js/plugin-data-loader": "3.9.
|
|
133
|
-
"@modern-js/prod-server": "3.9.
|
|
134
|
-
"@modern-js/server": "3.9.
|
|
135
|
-
"@modern-js/server-
|
|
136
|
-
"@modern-js/server-
|
|
137
|
-
"@modern-js/types": "3.9.
|
|
138
|
-
"@modern-js/utils": "3.9.
|
|
129
|
+
"@modern-js/builder": "3.9.3",
|
|
130
|
+
"@modern-js/i18n-utils": "3.9.3",
|
|
131
|
+
"@modern-js/plugin": "3.9.3",
|
|
132
|
+
"@modern-js/plugin-data-loader": "3.9.3",
|
|
133
|
+
"@modern-js/prod-server": "3.9.3",
|
|
134
|
+
"@modern-js/server": "3.9.3",
|
|
135
|
+
"@modern-js/server-utils": "3.9.3",
|
|
136
|
+
"@modern-js/server-core": "3.9.3",
|
|
137
|
+
"@modern-js/types": "3.9.3",
|
|
138
|
+
"@modern-js/utils": "3.9.3"
|
|
139
139
|
},
|
|
140
140
|
"devDependencies": {
|
|
141
|
-
"@rslib/core": "1.0.
|
|
141
|
+
"@rslib/core": "1.0.1",
|
|
142
142
|
"@types/babel__traverse": "7.28.0",
|
|
143
143
|
"@types/node": "^20",
|
|
144
144
|
"ts-node": "^10.9.2",
|
|
@@ -1,53 +0,0 @@
|
|
|
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 __rspack_default_export = ()=>({
|
|
31
|
-
name: '@modern-js/plugin-server-runtime',
|
|
32
|
-
setup (api) {
|
|
33
|
-
api.config(()=>({
|
|
34
|
-
output: {
|
|
35
|
-
externals: [
|
|
36
|
-
{
|
|
37
|
-
'@modern-js/server-runtime': '@modern-js/server-runtime'
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
__webpack_require__.d(__webpack_exports__, {}, {
|
|
45
|
-
default: __rspack_default_export
|
|
46
|
-
});
|
|
47
|
-
exports["default"] = __webpack_exports__["default"];
|
|
48
|
-
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
49
|
-
"default"
|
|
50
|
-
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
51
|
-
Object.defineProperty(exports, '__esModule', {
|
|
52
|
-
value: true
|
|
53
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const serverRuntime = ()=>({
|
|
2
|
-
name: '@modern-js/plugin-server-runtime',
|
|
3
|
-
setup (api) {
|
|
4
|
-
api.config(()=>({
|
|
5
|
-
output: {
|
|
6
|
-
externals: [
|
|
7
|
-
{
|
|
8
|
-
'@modern-js/server-runtime': '@modern-js/server-runtime'
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
12
|
-
}));
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
export default serverRuntime;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import "node:module";
|
|
2
|
-
const serverRuntime = ()=>({
|
|
3
|
-
name: '@modern-js/plugin-server-runtime',
|
|
4
|
-
setup (api) {
|
|
5
|
-
api.config(()=>({
|
|
6
|
-
output: {
|
|
7
|
-
externals: [
|
|
8
|
-
{
|
|
9
|
-
'@modern-js/server-runtime': '@modern-js/server-runtime'
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
}
|
|
13
|
-
}));
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
export default serverRuntime;
|