@alauda-fe/dynamic-plugin-sdk-rspack 0.0.1-alpha.2 → 0.0.1-alpha.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 (2) hide show
  1. package/index.js +19 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -129,11 +129,15 @@ function createRemoteProxy({ disableDevPluginProxy = false } = {}) {
129
129
  return remoteProxy;
130
130
  }
131
131
  var with_host_mfe_config_default = async (mfeConfig, overrideConfig, options = {}) => {
132
- const mfe = await withModuleFederation(mfeConfig, overrideConfig);
133
- const { disableDevPluginProxy = false } = options;
132
+ const mfe = await withModuleFederation(mfeConfig, {
133
+ ...overrideConfig,
134
+ dts: false
135
+ });
134
136
  return (config) => merge2(mfe(config, { context: config.context }), {
135
137
  devServer: {
136
- proxy: createRemoteProxy({ disableDevPluginProxy })
138
+ proxy: createRemoteProxy({
139
+ disableDevPluginProxy: options.disableDevPluginProxy
140
+ })
137
141
  }
138
142
  });
139
143
  };
@@ -171,10 +175,20 @@ var generateName = (name) => {
171
175
  return `${name}__${commitID}`;
172
176
  };
173
177
  var with_remote_mfe_config_default = async (mfeConfig, overrideConfig) => {
174
- const mfe = await withModuleFederation2(mfeConfig, overrideConfig);
178
+ const mfe = await withModuleFederation2(mfeConfig, {
179
+ ...overrideConfig,
180
+ dts: false,
181
+ // @ts-expect-error - The type definition of withModuleFederation is not accurate, it should allow filename to be string
182
+ filename: "remoteEntry.mjs",
183
+ library: {
184
+ type: "module"
185
+ }
186
+ });
175
187
  return (config) => {
176
188
  return merge4(mfe(config, { context: config.context }), {
177
- output: { uniqueName: generateName(mfeConfig.name) },
189
+ output: {
190
+ uniqueName: generateName(mfeConfig.name)
191
+ },
178
192
  devServer: {
179
193
  headers: {
180
194
  "Access-Control-Allow-Origin": "*"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda-fe/dynamic-plugin-sdk-rspack",
3
- "version": "0.0.1-alpha.2",
3
+ "version": "0.0.1-alpha.3",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "sideEffects": false,