Comments (12)
@ybom77 你好,我也是因为使用了slot遇到了类似的问题,但没有引用第三方库,您这个问题是怎么解决的?
from vite-plugin-federation.
Could you give me a sandbox or repository to reproduce the problem?
And I checked the associated ISSUE and theoretically unless you configure requireVersion
to force the required vue version, the remote and host side should be running with the same vue lib.
from vite-plugin-federation.
Thank you for your prompt reply
there is my demo adress : github demo
Hope to get your help
from vite-plugin-federation.
Is the correct result supposed to be like this? I see no error reported by console
from vite-plugin-federation.
~~weird
In my console it is like this
how did you do it, can you tell me the steps
from vite-plugin-federation.
You can modify the shared content in the demo-vite/packages/vue3-primevue/vite.config.ts
file as follows
shared: ["vue","primevue/button"]
Then you will get the result in the above figure.
But there is still the nagging problem that you may need to bring in the contents of primevue peeled shrimp multiple times, depending on how many components of primevue you use, because there is no main field under the primevue root package.json to specify the entry file for the whole package (at least I didn't find one), but rather each folder is a separate package, so there may be such a shared:
shared: ["vue","primevue/button","primevue/dialog","primevue/menu",...and so on]
from vite-plugin-federation.
After I changed the shared content, the result is normal
from vite-plugin-federation.
It's my problem, now it works fine , thanks for your help
from vite-plugin-federation.
@iotopo 你好,有解决slot的问题吗
from vite-plugin-federation.
@iotopo 你好,有解决slot的问题吗
插眼,同问。解决后麻烦@。
from vite-plugin-federation.
解决了吗?朋友们。
from vite-plugin-federation.
got this error with shared: ['vue', 'primevue/button']
main-app/fe build: file:///Volumes/Working/project/micro-app/main-app/fe/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:2287
main-app/fe build: base = Object.assign(new Error(base.message), base);
main-app/fe build: ^
main-app/fe build: Error [RollupError]: No description file or no version in description file (usually package.json) of primevue/button. Add version to description file, or manually specify version in shared config.
main-app/fe build: at error (file:///Volumes/Working/project/micro-app/main-app/fe/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:2287:30)
main-app/fe build: at Object.error (file:///Volumes/Working/project/micro-app/main-app/fe/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/node-entry.js:25351:20)
main-app/fe build: at Object.buildStart (file:///Volumes/Working/project/micro-app/main-app/fe/node_modules/.pnpm/@[email protected]/node_modules/@originjs/vite-plugin-federation/dist/index.mjs:756:18) {
main-app/fe build: code: 'PLUGIN_ERROR',
main-app/fe build: plugin: 'originjs:federation'
main-app/fe build: }
main-app/fe build: Node.js v18.7.0
from vite-plugin-federation.
Related Issues (20)
- ERROR: Expression Expected - Unable to understand this error
- Mutliple WS connections established to the remote app
- Adding and then removing `manualChunks` causes runtime error
- flattenModule breaks dependencies HOT 1
- exporting variables from the shared module, the variables within the shared module appear as undefined HOT 1
- module federation react typescript webpack and vite throws an error "Loading script failed." HOT 2
- Vue2.7, Vite host with webpack remote, "shared" create undefiend paramter(with Reproduction project)
- 【example demo bug】Did not work as expected when using the sample demo HOT 3
- 【bug】vue3-demo-esm-shared-store running __federation_shared_myStore-ed6e87a0.js 404
- Module Federation + base url HOT 3
- Vite Module Federation CORS error HOT 4
- Do something like @module-federation/typescript? HOT 2
- Error: Minified React error #321; HOT 5
- Enable CORS by including credentials when fetching Remotes on other Domains
- Uncaught (in promise) TypeError: Failed to construct 'URL': Invalid URL HOT 2
- Shared dependencies is loaded sequentially
- React module federation gives __federation_shared_react-dom-6fc2ee8d.js:224 TypeError: Cannot read properties of null (reading 'useContext') at react_production_min.useContext (__federation_shared_react-af90d75c.js:59:144) HOT 6
- [MaterialUI] Cannot read properties of null (reading 'useContext')
- Is this project abandonned HOT 8
- Error accessing remoteEntry.js files throughout vite examples HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vite-plugin-federation.