buefy / nuxt-buefy

Nuxt Buefy
MIT License
221 stars 33 forks source link

Buefy import options not working #88

Closed nmaxcom closed 3 years ago

nmaxcom commented 3 years ago

I've tried both ways:

  // Modules (https://go.nuxtjs.dev/config-modules)
  modules: [
    'nuxt-buefy',
    // https://go.nuxtjs.dev/axios
    '@nuxtjs/axios',
  ],
  buefy:{
    css: false,
    materialDesignIcons: true,
    defaultLocale: 'es-ES',
    defaultDialogConfirmText: 'Aceptar',
    defaultDialogCancelText: 'Cancelar'
  },

and:

// Modules (https://go.nuxtjs.dev/config-modules)
  modules: [
    [
      'nuxt-buefy',
      {
        css: false,
        materialDesignIcons: true,
        defaultLocale: 'es-ES',
        defaultDialogConfirmText: 'Aceptar',
        defaultDialogCancelText: 'Cancelar'
      }
    ],
    // https://go.nuxtjs.dev/axios
    '@nuxtjs/axios',
  ],

In either way it stops importing the CSS and the styling breaks. I don't see any errors anywhere.

fabiofdsantos commented 3 years ago

Did you define css property in nuxt.config? E.g. css: ['@/assets/scss/main.scss']

You should also include in .scss file:

// Import bulma styles
@import "~bulma";

// Import buefy styles
@import "~buefy/src/scss/buefy";
nmaxcom commented 3 years ago

Thanks for helping @fabiofdsantos. I haven't tried your solution but I found a way to make it work playing with the CSS property which makes me think you are right.

However, why is this not explained in this repo's readme? I find myself too often struggling with stuff that should work from the get-go, as described, but it doesn't. Granted, I'm a newbie using nuxt/buefy, but isn't that the point of the documentation?

fabiofdsantos commented 3 years ago

@nmaxcom I created a PR to make it clear in the readme 👍🏻