guillembonet / single-spa-parcel-example Goto Github PK
View Code? Open in Web Editor NEWAn example of web app built with multiple microfrontends running in different VM's using the single-spa framework.
License: MIT License
An example of web app built with multiple microfrontends running in different VM's using the single-spa framework.
License: MIT License
An example of how to handle passing props to parcel component when single-spa update
lifecycle is triggered with new props would be great.
I'm passing the custom props to vue component like this:
import Vue from 'vue';
import singleSpaVue from 'single-spa-vue';
import App from '@/App.vue';
Vue.config.productionTip = false;
const vueLifecycles = singleSpaVue({
Vue,
async appOptions(props) {
return render(h) {
return h(App, {props});
}
},
});
export const { bootstrap, mount, unmount } = vueLifecycles;
export async function update(props) {
// how to update props in render??
}
I need the props being passed to App
to update, so that App is rerendered. How do I do that?
While running example on local trying to run sample-vue and sample-vue-parcel using npm run serve getting following error
INFO Starting development server...
98% after emitting CopyPlugin
ERROR Failed to compile with 4 errors 4:10:19 PM
error in ./src/components/ParcelPage.vue
Module parse failed: Unexpected token (1:0)
File was processed with these loaders:
|
|This is a Vue App
@ ./src/main.js 16:0-53 33:15-25
@ multi (webpack)-dev-server/client?http://192.168.0.184:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.jserror in ./src/components/Home.vue
Module parse failed: Unexpected token (1:0)
File was processed with these loaders:
- ./node_modules/eslint-loader/index.js
You may need an additional loader to handle the result of these loaders.|
|This is a Vue app
@ ./src/main.js 9:0-41 25:15-19
@ multi (webpack)-dev-server/client?http://192.168.0.184:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.jserror in ./src/components/About.vue
Module parse failed: Unexpected token (1:0)
File was processed with these loaders:
- ./node_modules/eslint-loader/index.js
You may need an additional loader to handle the result of these loaders.|
|This is an About page
@ ./src/main.js 10:0-43 29:15-20
@ multi (webpack)-dev-server/client?http://192.168.0.184:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.jserror in ./src/App.vue
Module parse failed: Unexpected token (1:0)
File was processed with these loaders:
- ./node_modules/eslint-loader/index.js
You may need an additional loader to handle the result of these loaders.|
|@ ./src/main.js 7:0-28 40:15-18
@ multi (webpack)-dev-server/client?http://192.168.0.184:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.