A
A
artloveyou2021-09-10 23:49:52
Vue.js
artloveyou, 2021-09-10 23:49:52

How to use set flags in nuxt.js?

I put flags https://github.com/HatScripts/circle-flags .
And how to use them in templates without taking https://hatscripts.github.io/circle-flags/flags/xx.svg from here but from node_modules?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri, 2021-09-11
@artloveyou

1. Install nuxt-svg-loader
2. Don't forget to add loader to nuxt.config.js
3. Import flag as component:
import RuFlag from 'circle-flags/flags/ru.svg'
4. Use component in template:
<RuFlag />

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question