JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums General Discussions [Vue warn]: Failed to resolve component: smart-editor If this is a native custom

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #104168
    jqwidgetsdev
    Participant

    Hi,

    I am running into this error,

    [Vue warn]: Failed to resolve component: smart-editor
    If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.

    …but am a little puzzled why exactly since my main.js is defined as such.

    import { createApp } from 'vue'
    import App from './App.vue'
    
    const app = createApp(App)
    
    app.config.isCustomElement = tag => tag.startsWith('smart-');
    app.mount('#app')
    

    Any pointers how to resolve?

    Thank you

    #104176

    Hi,

    Have you used the Vite tooling, if so you can modify the Vite config

    vite.config.js:

    
    import { fileURLToPath, URL } from 'node:url'
    
    import { defineConfig } from 'vite'
    import vue from '@vitejs/plugin-vue'
    
    // https://vitejs.dev/config/
    export default defineConfig({
    plugins: [vue({
    template: {
    compilerOptions: {
    isCustomElement: tag => tag.startsWith('smart-')
    }
    }
    })],
    resolve: {
    alias: {
    '@': fileURLToPath(new URL('./src', import.meta.url))
    }
    }
    })
    

    I hope this helps you resolve the problem

     

    Best Regards,
    Svetoslav Borislavov

    Smart UI Team
    https://www.htmlelements.com/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.