@jiayouzuo/vite-module-federation-core 0.6.2 → 0.6.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.
@@ -1 +1 @@
1
- {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/dev/remote.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAiBnF,wBAAgB,eAAe,CAAC,OAAO,EAAE,2BAA2B,GAAG,mBAAmB,CA4QzF"}
1
+ {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/dev/remote.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAiBnF,wBAAgB,eAAe,CAAC,OAAO,EAAE,2BAA2B,GAAG,mBAAmB,CA4QzF"}
@@ -2,6 +2,7 @@
2
2
  * 开发环境 - 远程模块插件
3
3
  */
4
4
  import MagicString from 'magic-string';
5
+ import { posix } from 'path';
5
6
  import { parsedOptions, parseRemoteOptions, devRemotes, createRemotesMap, getModuleMarker, getFileExtname, normalizePath, REMOTE_FROM_PARAMETER } from '../utils.js';
6
7
  import { walk } from '../walker.js';
7
8
  // 默认需要转换的文件类型
@@ -256,7 +257,7 @@ async function devSharedScopeCode(viteDevServer, shared) {
256
257
  const moduleFilePath = normalizePath(moduleInfo.id);
257
258
  const idx = moduleFilePath.indexOf(cwdPath);
258
259
  const relativePath = idx === 0
259
- ? require('path').posix.join(base, moduleFilePath.slice(cwdPath.length))
260
+ ? posix.join(base, moduleFilePath.slice(cwdPath.length))
260
261
  : null;
261
262
  const sharedName = item[0];
262
263
  const obj = item[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiayouzuo/vite-module-federation-core",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "type": "module",
5
5
  "description": "Vite插件:模块联邦核心实现",
6
6
  "main": "dist/index.js",