peshanghiwa / vue-awesome-paginate

The Awesome Vue.js 3 Pagination Library
MIT License
158 stars 20 forks source link

Can't import styles in nuxt3 #21

Closed AlexKharenko closed 3 months ago

AlexKharenko commented 7 months ago

I copied "how to use with nuxt 3 example" and styles is not imported. Also i tried to put it in component where i use and in style. Nothing helped.

wavedeck commented 6 months ago

I've followed the example in the readme.md and can confirm it working in my nuxt 3.11.x project. This is probably something specific to your environment.

Please try to alternatively import the "vue-awesome-paginate/dist/style.css" inside your nuxt.config.ts to tell the nuxt compiler to include it in the css output.

// https://nuxt.com/docs/api/configuration/nuxt-config

export default defineNuxtConfig({
 // your other settings...
  css: ["vue-awesome-paginate/dist/style.css"],
});

but you might not need the styles anyways! This package works completely fine without the included stylesheet, so you can style the pagination yourself without adding any additional bloat to the page.