@shijiu/jsview 2.1.363-test.0 → 2.1.364-test.0
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/package.json
CHANGED
|
@@ -150,22 +150,23 @@ function genFederationConfigFunction(options)
|
|
|
150
150
|
var content = '';
|
|
151
151
|
if(options.mode == 'remote') {
|
|
152
152
|
content += `
|
|
153
|
-
function setFederationRemoteConfig(config) {`;
|
|
153
|
+
function setFederationRemoteConfig(config, federation) {`;
|
|
154
154
|
} else if(options.mode == 'host') {
|
|
155
155
|
content += `
|
|
156
|
-
function setFederationHostConfig(config) {`;
|
|
156
|
+
function setFederationHostConfig(config, federation) {`;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
|
|
160
|
-
if(options.jsviewMode == 'expose') {
|
|
161
|
-
content += `
|
|
159
|
+
content += `
|
|
162
160
|
config.build = (config.build || {})
|
|
163
161
|
config.build.rollupOptions = (config.build.rollupOptions || {})
|
|
164
162
|
config.build.rollupOptions.output = (config.build.rollupOptions.output || {})
|
|
165
163
|
config.build.rollupOptions.output.manualChunks = (config.build.rollupOptions.output.manualChunks || {})
|
|
166
|
-
|
|
167
|
-
config.build.rollupOptions.output.chunkFileNames = getChunkFileName
|
|
168
164
|
config.build.rollupOptions.output.manualChunks["__federation_fn_import"] = ["__federation_fn_import"]`;
|
|
165
|
+
|
|
166
|
+
if(options.mode == 'remote') {
|
|
167
|
+
if(options.jsviewMode == 'expose') {
|
|
168
|
+
content += `
|
|
169
|
+
config.build.rollupOptions.output.chunkFileNames = getChunkFileName`;
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
172
|
|
|
@@ -217,8 +218,7 @@ function createFederationHostConfigFile(options)
|
|
|
217
218
|
const federationConfigName = 'federation.host.config.ts';
|
|
218
219
|
Logger.Info('Creating ' + federationConfigName + ' ...');
|
|
219
220
|
|
|
220
|
-
var federationConfigContent =
|
|
221
|
-
import federation from '@originjs/vite-plugin-federation'`;
|
|
221
|
+
var federationConfigContent = '';
|
|
222
222
|
|
|
223
223
|
federationConfigContent += '\n';
|
|
224
224
|
federationConfigContent += genFederationUrl(options);
|
|
@@ -309,7 +309,7 @@ function updateTsConfigFile(options)
|
|
|
309
309
|
if(regex.test(tsConfigContent) == false) {
|
|
310
310
|
tsConfigContent = tsConfigContent.replace(/"jsview"/, '"RemoteEntry/JsViewVue": [ "./node_modules/@shijiu/jsview-vue" ],\n $&');
|
|
311
311
|
}
|
|
312
|
-
fs.writeFileSync(
|
|
312
|
+
fs.writeFileSync(tsConfigPath, tsConfigContent, 'utf-8');
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
}
|