create-module-federation 0.0.0-next-20250305092648 → 0.0.0-next-20250305094132
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
|
@@ -2,6 +2,7 @@ import { pluginReact } from '@rsbuild/plugin-react';
|
|
|
2
2
|
import { defineConfig } from '@rslib/core';
|
|
3
3
|
import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
|
|
4
4
|
import moduleFederationConfig from './module-federation.config';
|
|
5
|
+
import pkg from './package.json';
|
|
5
6
|
|
|
6
7
|
const shared = {
|
|
7
8
|
dts: {
|
|
@@ -33,6 +34,11 @@ export default defineConfig({
|
|
|
33
34
|
...shared,
|
|
34
35
|
format: 'mf',
|
|
35
36
|
output: {
|
|
37
|
+
// set unpkg cdn as assetPrefix if you want to publish
|
|
38
|
+
assetPrefix:
|
|
39
|
+
process.env.NODE_ENV === 'production'
|
|
40
|
+
? `https://unpkg.com/${pkg.name}@latest/dist/mf/`
|
|
41
|
+
: undefined,
|
|
36
42
|
distPath: {
|
|
37
43
|
root: './dist/mf',
|
|
38
44
|
},
|