@blotch/rsbuild-plugin-angular-lynx 22.2.4 → 22.2.6
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/index.js +11 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1154,6 +1154,11 @@ const buildTransformedCode = (params)=>{
|
|
|
1154
1154
|
compiled: params.code
|
|
1155
1155
|
});
|
|
1156
1156
|
};
|
|
1157
|
+
const nativeOutputPattern = (rootPath, distPath)=>{
|
|
1158
|
+
const root = 'string' == typeof distPath ? distPath : distPath?.root;
|
|
1159
|
+
const dist = node_path.resolve(rootPath, root ?? 'dist').replaceAll(node_path.sep, '/').replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
1160
|
+
return new RegExp(`^${dist}/(?:ios|android)$`);
|
|
1161
|
+
};
|
|
1157
1162
|
const applyAngularConfig = (api, buildOptions)=>{
|
|
1158
1163
|
const __dirname = node_path.dirname(fileURLToPath(import.meta.url));
|
|
1159
1164
|
api.modifyRsbuildConfig((config)=>{
|
|
@@ -1162,7 +1167,12 @@ const applyAngularConfig = (api, buildOptions)=>{
|
|
|
1162
1167
|
...'object' == typeof config.output.distPath ? config.output.distPath : {},
|
|
1163
1168
|
root: buildOptions.outputPath
|
|
1164
1169
|
};
|
|
1165
|
-
config.output.cleanDistPath =
|
|
1170
|
+
config.output.cleanDistPath = {
|
|
1171
|
+
enable: true,
|
|
1172
|
+
keep: [
|
|
1173
|
+
nativeOutputPattern(api.context.rootPath, config.output.distPath)
|
|
1174
|
+
]
|
|
1175
|
+
};
|
|
1166
1176
|
config.source ??= {};
|
|
1167
1177
|
if ('string' == typeof config.source.preEntry) config.source.preEntry = [
|
|
1168
1178
|
config.source.preEntry
|
package/package.json
CHANGED