How to register a custom component correctly to solve "Unknown custom element:" for CSS purpose only.

pratyushtewari
10
pratyushtewari
commented 5 months ago

I am using Raster pure css grid globally (https://rsms.me/raster/). This uses custom html tags grid and c. These are not vue components and they are pure html nodes for CSS selection only. I am not able to find any example like this that solves custom html tags error without creating a component first.

I just need to use a template like

<template>
  <footer>
    <grid col="4" col-s="2">
      <c span="2" span-s="2"> 
        Some text
      </c>
    </grid>
  </footer>
</template>

I've read all the comments pertaining to the Unknown custom html issue on nuxt github but all of them suggest creating a component. Can you please help me fix this issue?

0
pratyushtewari
10
pratyushtewari
commented 4 months ago

Finally found the solution.

Ref: https://github.com/nuxt/nuxt.js/issues/6050#issuecomment-511757611

I added

  vue: {
    config: {
      ignoredElements :['grid', 'c']
    }
  },

to the nuxt.config.js file.

0
pratyushtewari
10
pratyushtewari
commented 5 months ago

Can anyone help me on this?

0
pratyushtewari
10
pratyushtewari
commented 4 months ago

Finally found the solution.

Ref: https://github.com/nuxt/nuxt.js/issues/6050#issuecomment-511757611

I added

  vue: {
    config: {
      ignoredElements :['grid', 'c']
    }
  },

to the nuxt.config.js file.

0
Informations
Question โ€ข Resolved
#c10173 - Created 5 months ago