forked from module-federation/vite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: share custom path module-federation#131
- Loading branch information
1 parent
ef9bc5a
commit a57000b
Showing
5 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
examples/vite-vite/vite-host/vite.config.js.timestamp-1728315610870-9397701f4e9c3.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// vite.config.js | ||
import { federation } from "file:///Users/zhanghongen/Desktop/zwork/open-code/vite8/lib/index.cjs"; | ||
import react from "file:///Users/zhanghongen/Desktop/zwork/open-code/vite8/node_modules/.pnpm/@[email protected][email protected]_@[email protected][email protected][email protected]_/node_modules/@vitejs/plugin-react/dist/index.mjs"; | ||
import { defineConfig } from "file:///Users/zhanghongen/Desktop/zwork/open-code/vite8/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/vite/dist/node/index.js"; | ||
import topLevelAwait from "file:///Users/zhanghongen/Desktop/zwork/open-code/vite8/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]_@types+node@22._krbzckfzdnw5tslgq6xfzhp7ly/node_modules/vite-plugin-top-level-await/exports/import.mjs"; | ||
var vite_config_default = defineConfig({ | ||
server: { | ||
open: true, | ||
port: 5175 | ||
}, | ||
preview: { | ||
port: 5175 | ||
}, | ||
// base: 'http://localhost:5175', | ||
plugins: [ | ||
react(), | ||
federation({ | ||
name: "viteViteHost", | ||
remotes: { | ||
mfapp01: "mfapp01@https://unpkg.com/[email protected]/dist/remoteEntry.js", | ||
remote2: "mfapp02@https://unpkg.com/mf-app-02/dist/remoteEntry.js", | ||
remote3: "remote1@https://unpkg.com/[email protected]/dist/mf-manifest.json", | ||
"@namespace/viteViteRemote": "http://localhost:5176/mf-manifest.json" | ||
}, | ||
filename: "remoteEntry-[hash].js", | ||
manifest: true, | ||
shared: { | ||
vue: {}, | ||
"react/": { | ||
requiredVersion: "18" | ||
}, | ||
"react-dom": {}, | ||
"ag-grid-community": {}, | ||
"ag-grid-react": {}, | ||
"@emotion/react": {}, | ||
"styled-components": { singleton: true }, | ||
"@emotion/styled": {}, | ||
"@mui/material": {} | ||
}, | ||
runtimePlugins: ["./src/mfPlugins"] | ||
}), | ||
// If you set build.target: "chrome89", you can remove this plugin | ||
false | ||
], | ||
build: { | ||
target: "chrome89" | ||
} | ||
}); | ||
export { | ||
vite_config_default as default | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvemhhbmdob25nZW4vRGVza3RvcC96d29yay9vcGVuLWNvZGUvdml0ZTgvZXhhbXBsZXMvdml0ZS12aXRlL3ZpdGUtaG9zdFwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiL1VzZXJzL3poYW5naG9uZ2VuL0Rlc2t0b3Avendvcmsvb3Blbi1jb2RlL3ZpdGU4L2V4YW1wbGVzL3ZpdGUtdml0ZS92aXRlLWhvc3Qvdml0ZS5jb25maWcuanNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL1VzZXJzL3poYW5naG9uZ2VuL0Rlc2t0b3Avendvcmsvb3Blbi1jb2RlL3ZpdGU4L2V4YW1wbGVzL3ZpdGUtdml0ZS92aXRlLWhvc3Qvdml0ZS5jb25maWcuanNcIjtpbXBvcnQgeyBmZWRlcmF0aW9uIH0gZnJvbSAnQG1vZHVsZS1mZWRlcm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QUFNO0FBQUEsRUFDUjtBQUFBO0FBQUEsRUFFQSxTQUFTO0FBQUEsSUFDUCxNQUFNO0FBQUEsSUFDTixXQUFXO0FBQUEsTUFDVCxNQUFNO0FBQUEsTUFDTixTQUFTO0FBQUEsUUFDUCxTQUFTO0FBQUEsUUFDVCxTQUFTO0FBQUEsUUFDVCxTQUNFO0FBQUEsUUFDRiw2QkFBNkI7QUFBQSxNQUMvQjtBQUFBLE1BQ0EsVUFBVTtBQUFBLE1BQ1YsVUFBVTtBQUFBLE1BQ1YsUUFBUTtBQUFBLFFBQ04sS0FBSyxDQUFDO0FBQUEsUUFDTixVQUFVO0FBQUEsVUFDUixpQkFBaUI7QUFBQSxRQUNuQjtBQUFBLFFBQ0EsYUFBYSxDQUFDO0FBQUEsUUFDZCxxQkFBcUIsQ0FBQztBQUFBLFFBQ3RCLGlCQUFpQixDQUFDO0FBQUEsUUFDbEIsa0JBQWtCLENBQUM7QUFBQSxRQUNuQixxQkFBcUIsRUFBRSxXQUFXLEtBQUs7QUFBQSxRQUN2QyxtQkFBbUIsQ0FBQztBQUFBLFFBQ3BCLGlCQUFpQixDQUFDO0FBQUEsTUFDcEI7QUFBQSxNQUNBLGdCQUFnQixDQUFDLGlCQUFpQjtBQUFBLElBQ3BDLENBQUM7QUFBQTtBQUFBLElBRUQ7QUFBQSxFQUNGO0FBQUEsRUFDQSxPQUFPO0FBQUEsSUFDTCxRQUFRO0FBQUEsRUFDVjtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function () { | ||
console.log(12313123); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters