@modern-js/app-tools 3.11.2 → 3.11.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/builder/shared/builderPlugins/adapterBasic.js +8 -2
- package/dist/cjs/builder/shared/bundlerPlugins/HtmlBottomTemplate.js +1 -1
- package/dist/cjs/index.js +2 -3
- package/dist/esm/builder/shared/builderPlugins/adapterBasic.mjs +8 -2
- package/dist/esm/builder/shared/bundlerPlugins/HtmlBottomTemplate.mjs +1 -1
- package/dist/esm-node/builder/shared/builderPlugins/adapterBasic.mjs +8 -2
- package/dist/esm-node/builder/shared/bundlerPlugins/HtmlBottomTemplate.mjs +1 -1
- package/package.json +14 -14
|
@@ -55,10 +55,9 @@ const builderPluginAdapterBasic = (options)=>({
|
|
|
55
55
|
chain.module.rule('bare-server-module').test(bareServerModuleReg).use('server-module-loader').loader(external_node_path_default().join(__dirname, `../loaders/serverModuleLoader.${depExt}`));
|
|
56
56
|
}
|
|
57
57
|
const { appContext } = options;
|
|
58
|
-
const { metaName } = appContext;
|
|
59
58
|
chain.watchOptions({
|
|
60
59
|
ignored: [
|
|
61
|
-
|
|
60
|
+
createWatchIgnored(appContext.internalDirectory)
|
|
62
61
|
]
|
|
63
62
|
});
|
|
64
63
|
});
|
|
@@ -128,6 +127,13 @@ function applyNodeCompat(isServiceWorker, chain) {
|
|
|
128
127
|
for (const ext of nodeExts)chain.resolve.extensions.prepend(ext);
|
|
129
128
|
if (isServiceWorker) for (const ext of webWorkerExts)chain.resolve.extensions.prepend(ext);
|
|
130
129
|
}
|
|
130
|
+
function createWatchIgnored(internalDirectory) {
|
|
131
|
+
const segments = internalDirectory.split(/[\\/]/);
|
|
132
|
+
const index = segments.lastIndexOf('node_modules');
|
|
133
|
+
const internalPath = segments.slice(index + 1).map((segment)=>segment.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('[\\\\/]');
|
|
134
|
+
const nodeModules = -1 !== index && internalPath ? `node_modules(?![\\\\/]${internalPath}(?:[\\\\/]|$))` : 'node_modules';
|
|
135
|
+
return new RegExp(`[\\\\/](?:${nodeModules}|\\.git)[\\\\/]`);
|
|
136
|
+
}
|
|
131
137
|
exports.builderPluginAdapterBasic = __webpack_exports__.builderPluginAdapterBasic;
|
|
132
138
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
133
139
|
"builderPluginAdapterBasic"
|
|
@@ -42,7 +42,7 @@ class BottomTemplatePlugin {
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
constructor(htmlPlugin){
|
|
45
|
-
this.bottomTemplateReg =
|
|
45
|
+
this.bottomTemplateReg = /<\x21--<\?-\s*bottomTemplate\s*\?>--\x3e/;
|
|
46
46
|
this.bodyRegExp = /(<\/\s*body\s*>)/i;
|
|
47
47
|
this.htmlPlugin = htmlPlugin;
|
|
48
48
|
this.name = 'bottom-template';
|
package/dist/cjs/index.js
CHANGED
|
@@ -277,7 +277,9 @@ var __webpack_exports__ = {};
|
|
|
277
277
|
});
|
|
278
278
|
const __rspack_default_export = appTools;
|
|
279
279
|
__webpack_require__.d(__webpack_exports__, {
|
|
280
|
+
appTools: ()=>appTools,
|
|
280
281
|
closeServer: ()=>_utils_createServer__rspack_import_19.closeServer,
|
|
282
|
+
default: ()=>__rspack_default_export,
|
|
281
283
|
defineConfig: ()=>_defineConfig__rspack_import_16.defineConfig,
|
|
282
284
|
dev: ()=>_commands_dev__rspack_import_17.dev,
|
|
283
285
|
generateWatchFiles: ()=>_utils_generateWatchFiles__rspack_import_13.generateWatchFiles,
|
|
@@ -285,9 +287,6 @@ var __webpack_exports__ = {};
|
|
|
285
287
|
mergeConfig: ()=>_modern_js_plugin_cli__rspack_import_22.mergeConfig,
|
|
286
288
|
resolveModernRsbuildConfig: ()=>_rsbuild__rspack_import_20.resolveModernRsbuildConfig,
|
|
287
289
|
serve: ()=>_commands_serve__rspack_import_18.serve
|
|
288
|
-
}, {
|
|
289
|
-
appTools: appTools,
|
|
290
|
-
default: __rspack_default_export
|
|
291
290
|
});
|
|
292
291
|
})();
|
|
293
292
|
exports.appTools = __webpack_exports__.appTools;
|
|
@@ -13,10 +13,9 @@ const builderPluginAdapterBasic = (options)=>({
|
|
|
13
13
|
chain.module.rule('bare-server-module').test(bareServerModuleReg).use('server-module-loader').loader(node_path.join(__dirname, `../loaders/serverModuleLoader.${depExt}`));
|
|
14
14
|
}
|
|
15
15
|
const { appContext } = options;
|
|
16
|
-
const { metaName } = appContext;
|
|
17
16
|
chain.watchOptions({
|
|
18
17
|
ignored: [
|
|
19
|
-
|
|
18
|
+
createWatchIgnored(appContext.internalDirectory)
|
|
20
19
|
]
|
|
21
20
|
});
|
|
22
21
|
});
|
|
@@ -86,4 +85,11 @@ function applyNodeCompat(isServiceWorker, chain) {
|
|
|
86
85
|
for (const ext of nodeExts)chain.resolve.extensions.prepend(ext);
|
|
87
86
|
if (isServiceWorker) for (const ext of webWorkerExts)chain.resolve.extensions.prepend(ext);
|
|
88
87
|
}
|
|
88
|
+
function createWatchIgnored(internalDirectory) {
|
|
89
|
+
const segments = internalDirectory.split(/[\\/]/);
|
|
90
|
+
const index = segments.lastIndexOf('node_modules');
|
|
91
|
+
const internalPath = segments.slice(index + 1).map((segment)=>segment.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('[\\\\/]');
|
|
92
|
+
const nodeModules = -1 !== index && internalPath ? `node_modules(?![\\\\/]${internalPath}(?:[\\\\/]|$))` : 'node_modules';
|
|
93
|
+
return new RegExp(`[\\\\/](?:${nodeModules}|\\.git)[\\\\/]`);
|
|
94
|
+
}
|
|
89
95
|
export { builderPluginAdapterBasic };
|
|
@@ -13,7 +13,7 @@ class BottomTemplatePlugin {
|
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
15
|
constructor(htmlPlugin){
|
|
16
|
-
this.bottomTemplateReg =
|
|
16
|
+
this.bottomTemplateReg = /<\x21--<\?-\s*bottomTemplate\s*\?>--\x3e/;
|
|
17
17
|
this.bodyRegExp = /(<\/\s*body\s*>)/i;
|
|
18
18
|
this.htmlPlugin = htmlPlugin;
|
|
19
19
|
this.name = 'bottom-template';
|
|
@@ -17,10 +17,9 @@ const builderPluginAdapterBasic = (options)=>({
|
|
|
17
17
|
chain.module.rule('bare-server-module').test(bareServerModuleReg).use('server-module-loader').loader(node_path.join(__rspack_import_meta_dirname__, `../loaders/serverModuleLoader.${depExt}`));
|
|
18
18
|
}
|
|
19
19
|
const { appContext } = options;
|
|
20
|
-
const { metaName } = appContext;
|
|
21
20
|
chain.watchOptions({
|
|
22
21
|
ignored: [
|
|
23
|
-
|
|
22
|
+
createWatchIgnored(appContext.internalDirectory)
|
|
24
23
|
]
|
|
25
24
|
});
|
|
26
25
|
});
|
|
@@ -90,4 +89,11 @@ function applyNodeCompat(isServiceWorker, chain) {
|
|
|
90
89
|
for (const ext of nodeExts)chain.resolve.extensions.prepend(ext);
|
|
91
90
|
if (isServiceWorker) for (const ext of webWorkerExts)chain.resolve.extensions.prepend(ext);
|
|
92
91
|
}
|
|
92
|
+
function createWatchIgnored(internalDirectory) {
|
|
93
|
+
const segments = internalDirectory.split(/[\\/]/);
|
|
94
|
+
const index = segments.lastIndexOf('node_modules');
|
|
95
|
+
const internalPath = segments.slice(index + 1).map((segment)=>segment.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('[\\\\/]');
|
|
96
|
+
const nodeModules = -1 !== index && internalPath ? `node_modules(?![\\\\/]${internalPath}(?:[\\\\/]|$))` : 'node_modules';
|
|
97
|
+
return new RegExp(`[\\\\/](?:${nodeModules}|\\.git)[\\\\/]`);
|
|
98
|
+
}
|
|
93
99
|
export { builderPluginAdapterBasic };
|
|
@@ -14,7 +14,7 @@ class BottomTemplatePlugin {
|
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
constructor(htmlPlugin){
|
|
17
|
-
this.bottomTemplateReg =
|
|
17
|
+
this.bottomTemplateReg = /<\x21--<\?-\s*bottomTemplate\s*\?>--\x3e/;
|
|
18
18
|
this.bodyRegExp = /(<\/\s*body\s*>)/i;
|
|
19
19
|
this.htmlPlugin = htmlPlugin;
|
|
20
20
|
this.name = 'bottom-template';
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.11.
|
|
18
|
+
"version": "3.11.3",
|
|
19
19
|
"types": "./dist/types/index.d.ts",
|
|
20
20
|
"main": "./dist/cjs/index.js",
|
|
21
21
|
"exports": {
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"@babel/parser": "^7.29.12",
|
|
117
117
|
"@babel/traverse": "^7.29.12",
|
|
118
118
|
"@babel/types": "^7.29.11",
|
|
119
|
-
"@rsbuild/core": "2.3.
|
|
119
|
+
"@rsbuild/core": "2.3.2",
|
|
120
120
|
"@swc/core": "1.16.21",
|
|
121
121
|
"@swc/helpers": "^0.5.17",
|
|
122
122
|
"es-module-lexer": "^1.7.0",
|
|
@@ -126,16 +126,16 @@
|
|
|
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.11.
|
|
130
|
-
"@modern-js/i18n-utils": "3.11.
|
|
131
|
-
"@modern-js/plugin": "3.11.
|
|
132
|
-
"@modern-js/plugin-data-loader": "3.11.
|
|
133
|
-
"@modern-js/prod-server": "3.11.
|
|
134
|
-
"@modern-js/server": "3.11.
|
|
135
|
-
"@modern-js/server-core": "3.11.
|
|
136
|
-
"@modern-js/server-utils": "3.11.
|
|
137
|
-
"@modern-js/types": "3.11.
|
|
138
|
-
"@modern-js/utils": "3.11.
|
|
129
|
+
"@modern-js/builder": "3.11.3",
|
|
130
|
+
"@modern-js/i18n-utils": "3.11.3",
|
|
131
|
+
"@modern-js/plugin": "3.11.3",
|
|
132
|
+
"@modern-js/plugin-data-loader": "3.11.3",
|
|
133
|
+
"@modern-js/prod-server": "3.11.3",
|
|
134
|
+
"@modern-js/server": "3.11.3",
|
|
135
|
+
"@modern-js/server-core": "3.11.3",
|
|
136
|
+
"@modern-js/server-utils": "3.11.3",
|
|
137
|
+
"@modern-js/types": "3.11.3",
|
|
138
|
+
"@modern-js/utils": "3.11.3"
|
|
139
139
|
},
|
|
140
140
|
"devDependencies": {
|
|
141
141
|
"@types/babel__traverse": "7.28.0",
|
|
@@ -143,8 +143,8 @@
|
|
|
143
143
|
"ts-node": "^10.9.2",
|
|
144
144
|
"tsconfig-paths": "^4.2.0",
|
|
145
145
|
"typescript": "^5",
|
|
146
|
-
"@modern-js/rslib": "3.11.
|
|
147
|
-
"@scripts/rstest-config": "2.66.
|
|
146
|
+
"@modern-js/rslib": "3.11.3",
|
|
147
|
+
"@scripts/rstest-config": "2.66.7"
|
|
148
148
|
},
|
|
149
149
|
"peerDependencies": {
|
|
150
150
|
"ts-node": "^10.9.2",
|