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

Compiler options / isCustomElement not working #76

Open
juhasev opened this issue Jan 23, 2023 · 1 comment
Open

Compiler options / isCustomElement not working #76

juhasev opened this issue Jan 23, 2023 · 1 comment

Comments

@juhasev
Copy link

juhasev commented Jan 23, 2023

The compiler options need to be documented somewhere. I found some posts on how this is supposed to work in vue2 and vue3 plugins.

I am using the vue2 plugin, the latest version. The following configuration does nothing in the dev build.

Vue compiler throws errors for all custom components starting with <mj-

return defineConfig({

        plugins: [
            vue({
                template: {
                    transformAssetUrls: {
                        base: null,
                        includeAbsolute: false,
                    },
                    compilerOptions: {
                        isCustomElement: (tag) => tag.startsWith('mj')
                    }
                },
            }),
     ]
});

Am I doing something wrong, or is this a bug? Has anybody else had any success with the custom components like MJML?

Thanks, Juha

@vignesh-uj
Copy link

vignesh-uj commented Mar 7, 2023

Does this help :

In your main.js -> Vue.config.ignoredElements = [/mj-\w*/];

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