Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add vue-x, vue-router, ...? #2

Open
thiensubs opened this issue Mar 31, 2021 · 2 comments
Open

How to add vue-x, vue-router, ...? #2

thiensubs opened this issue Mar 31, 2021 · 2 comments

Comments

@thiensubs
Copy link

Dear @sreenaths ,

How can i add vue-x, vue-router to adapted with this library ?

My example code:

import {
    createApp,
    h
} from 'vue'
import App from '~/App.vue';
import 'tui-image-editor/dist/tui-image-editor.css';
import 'pace-js/themes/red/pace-theme-flash.css'
import PDFPage from '~/components/PDFPage.vue';
import router from '~/components/vue-route-app';

const app = createApp(App)
app.config.isCustomElement = (tag) => tag === 'pdf-page';
app.use(router)
app.component('pdf-page', PDFPage)
// app.mount('#app')
import wrapper from "vue3-webcomponent-wrapper";
const webComponent = wrapper(app, createApp, h);
window.customElements.define('my-element', webComponent)
@sreenaths
Copy link
Owner

This must help I guess vuejs/vue-web-component-wrapper#93 (comment)

@thiensubs
Copy link
Author

How I integrated this library and want to export all components inside the iFrame?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants