@modern-js/plugin-garfish 1.8.0 → 1.8.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @modern-js/plugin-garfish
2
2
 
3
+ ## 1.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: `@modern-js/plugin-garfish` support `pluginName` params
8
+
9
+ fix: `@modern-js/plugin-garfish` 支持 `pluginName` 参数
10
+
3
11
  ## 1.8.0
4
12
 
5
13
  ### Minor Changes
@@ -27,6 +27,7 @@ export function getDefaultMicroFrontedConfig(microFrontend) {
27
27
  }, microFrontend);
28
28
  }
29
29
  export default (({
30
+ pluginName: _pluginName = '@modern-js/plugin-garfish',
30
31
  runtimePluginName: _runtimePluginName = '@modern-js/runtime/plugins',
31
32
  mfPackagePath: _mfPackagePath = path.resolve(__dirname, '../../../../')
32
33
  } = {}) => ({
@@ -173,7 +174,7 @@ export default (({
173
174
  },
174
175
 
175
176
  addRuntimeExports() {
176
- const addExportStatement = `export { default as garfish, default as masterApp, hoistNonReactStatics } from '@modern-js/plugin-garfish'`;
177
+ const addExportStatement = `export { default as garfish, default as masterApp, hoistNonReactStatics } from '${_pluginName}'`;
177
178
  logger('exportStatement', addExportStatement);
178
179
  pluginsExportsUtils.addExport(addExportStatement);
179
180
  runtimeExportsUtils.addExport(`export * from '${_mfPackagePath}'`);
@@ -44,6 +44,7 @@ function getDefaultMicroFrontedConfig(microFrontend) {
44
44
  }
45
45
 
46
46
  var _default = ({
47
+ pluginName: _pluginName = '@modern-js/plugin-garfish',
47
48
  runtimePluginName: _runtimePluginName = '@modern-js/runtime/plugins',
48
49
  mfPackagePath: _mfPackagePath = _path.default.resolve(__dirname, '../../../../')
49
50
  } = {}) => ({
@@ -190,7 +191,7 @@ var _default = ({
190
191
  },
191
192
 
192
193
  addRuntimeExports() {
193
- const addExportStatement = `export { default as garfish, default as masterApp, hoistNonReactStatics } from '@modern-js/plugin-garfish'`;
194
+ const addExportStatement = `export { default as garfish, default as masterApp, hoistNonReactStatics } from '${_pluginName}'`;
194
195
  (0, _util.logger)('exportStatement', addExportStatement);
195
196
  pluginsExportsUtils.addExport(addExportStatement);
196
197
  runtimeExportsUtils.addExport(`export * from '${_mfPackagePath}'`);
@@ -26,6 +26,8 @@ export function getDefaultMicroFrontedConfig(microFrontend) {
26
26
  }
27
27
  export default (function () {
28
28
  var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
29
+ _ref$pluginName = _ref.pluginName,
30
+ pluginName = _ref$pluginName === void 0 ? '@modern-js/plugin-garfish' : _ref$pluginName,
29
31
  _ref$runtimePluginNam = _ref.runtimePluginName,
30
32
  runtimePluginName = _ref$runtimePluginNam === void 0 ? '@modern-js/runtime/plugins' : _ref$runtimePluginNam,
31
33
  _ref$mfPackagePath = _ref.mfPackagePath,
@@ -184,7 +186,7 @@ export default (function () {
184
186
  };
185
187
  },
186
188
  addRuntimeExports: function addRuntimeExports() {
187
- var addExportStatement = "export { default as garfish, default as masterApp, hoistNonReactStatics } from '@modern-js/plugin-garfish'";
189
+ var addExportStatement = "export { default as garfish, default as masterApp, hoistNonReactStatics } from '".concat(pluginName, "'");
188
190
  logger('exportStatement', addExportStatement);
189
191
  pluginsExportsUtils.addExport(addExportStatement);
190
192
  runtimeExportsUtils.addExport("export * from '".concat(mfPackagePath, "'"));
@@ -13,9 +13,11 @@ export declare function getDefaultMicroFrontedConfig(microFrontend: NonInValidAb
13
13
  };
14
14
 
15
15
  declare const _default: ({
16
+ pluginName,
16
17
  runtimePluginName,
17
18
  mfPackagePath
18
19
  }?: {
20
+ pluginName?: string | undefined;
19
21
  runtimePluginName?: string | undefined;
20
22
  mfPackagePath?: string | undefined;
21
23
  }) => CliPlugin;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.8.0",
14
+ "version": "1.8.1",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/runtime/index.d.ts",
17
17
  "typesVersions": {