'how to add @carbon/type in nuxt
Im using @carbon/vue in a nuxt application and have created a plugin which i registered in my nuxt.config.js file. I am now trying to incorporate @carbon/type for fonts but it is not getting pulled in. How do i add carbon/type in nuxt?
carbon.js
import Vue from "vue";
import "carbon-components/css/carbon-components.css";
import CarbonComponentsVue from "@carbon/vue";
Vue.use(CarbonComponentsVue);
nuxt.config.js
plugins: [
{ src: '~plugins/pubnub.js', mode: 'client' },
{ src: '~plugins/axios.js', mode: 'client' },
{ src: '~plugins/auth.js', mode: 'client' },
{ src: '~plugins/vue-instantsearch.js' },
{ src: '~plugins/carbon.js', mode:'client' }
],
Solution 1:[1]
Hello please check your other files
In your src/App.vue
did you import
<style lang="scss">
@import "./styles/carbon";
</style>
In your src/styles/_carbon.scss
did you import
@import 'carbon-components/scss/globals/scss/styles';
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Transformer |