@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.
Files changed (45) hide show
  1. package/dist/cjs/commands/build.js +1 -2
  2. package/dist/cjs/commands/deploy.js +1 -3
  3. package/dist/cjs/commands/index.js +4 -0
  4. package/dist/cjs/compat/hooks.js +1 -1
  5. package/dist/cjs/index.js +27 -57
  6. package/dist/cjs/plugins/analyze/getFileSystemEntry.js +1 -1
  7. package/dist/cjs/plugins/analyze/getServerRoutes.js +1 -1
  8. package/dist/cjs/plugins/analyze/index.js +2 -2
  9. package/dist/cjs/plugins/analyze/utils.js +4 -5
  10. package/dist/cjs/plugins/initialize/index.js +3 -4
  11. package/dist/esm/commands/build.mjs +1 -2
  12. package/dist/esm/commands/deploy.mjs +1 -3
  13. package/dist/esm/commands/index.mjs +4 -0
  14. package/dist/esm/compat/hooks.mjs +1 -1
  15. package/dist/esm/index.mjs +2 -12
  16. package/dist/esm/plugins/analyze/getFileSystemEntry.mjs +1 -1
  17. package/dist/esm/plugins/analyze/getServerRoutes.mjs +1 -1
  18. package/dist/esm/plugins/analyze/index.mjs +2 -2
  19. package/dist/esm/plugins/analyze/utils.mjs +4 -5
  20. package/dist/esm/plugins/initialize/index.mjs +3 -4
  21. package/dist/esm-node/commands/build.mjs +1 -2
  22. package/dist/esm-node/commands/deploy.mjs +1 -3
  23. package/dist/esm-node/commands/index.mjs +4 -0
  24. package/dist/esm-node/compat/hooks.mjs +1 -1
  25. package/dist/esm-node/index.mjs +2 -12
  26. package/dist/esm-node/plugins/analyze/getFileSystemEntry.mjs +1 -1
  27. package/dist/esm-node/plugins/analyze/getServerRoutes.mjs +1 -1
  28. package/dist/esm-node/plugins/analyze/index.mjs +2 -2
  29. package/dist/esm-node/plugins/analyze/utils.mjs +4 -5
  30. package/dist/esm-node/plugins/initialize/index.mjs +3 -4
  31. package/dist/types/index.d.ts +1 -3
  32. package/dist/types/plugins/analyze/utils.d.ts +1 -1
  33. package/docs/configure/app/output/disable-svgr.md +4 -0
  34. package/docs/configure/app/output/svg-default-export.md +4 -0
  35. package/docs/configure/app/tools/less.md +94 -19
  36. package/docs/configure/app/tools/sass.md +87 -18
  37. package/docs/configure/app/tools/svgr.md +89 -0
  38. package/docs/guides/basic-features/static-assets/svg-assets.md +29 -17
  39. package/docs/llms.txt +3 -2
  40. package/docs/plugin/introduction.md +10 -10
  41. package/package.json +16 -16
  42. package/dist/cjs/plugins/serverRuntime.js +0 -53
  43. package/dist/esm/plugins/serverRuntime.mjs +0 -15
  44. package/dist/esm-node/plugins/serverRuntime.mjs +0 -16
  45. 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 | [output.disableSvgr](/configure/app/output/disable-svgr.md)<br />[output.svgDefaultExport](/configure/app/output/svg-default-export.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) |
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.1",
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.7",
117
- "@babel/traverse": "^7.29.7",
118
- "@babel/types": "^7.29.7",
119
- "@rsbuild/core": "2.2.4",
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.1",
130
- "@modern-js/i18n-utils": "3.9.1",
131
- "@modern-js/plugin": "3.9.1",
132
- "@modern-js/plugin-data-loader": "3.9.1",
133
- "@modern-js/prod-server": "3.9.1",
134
- "@modern-js/server": "3.9.1",
135
- "@modern-js/server-core": "3.9.1",
136
- "@modern-js/server-utils": "3.9.1",
137
- "@modern-js/types": "3.9.1",
138
- "@modern-js/utils": "3.9.1"
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.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;
@@ -1,3 +0,0 @@
1
- import type { AppTools, CliPlugin } from '../types/index.js';
2
- declare const _default: () => CliPlugin<AppTools>;
3
- export default _default;