Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuxt.js static site not displaying component correctly #573

Closed
lazaroofarrill opened this issue Oct 29, 2021 · 3 comments
Closed

Nuxt.js static site not displaying component correctly #573

lazaroofarrill opened this issue Oct 29, 2021 · 3 comments
Assignees
Labels
🔖4.x v4.x~ related issue 📦Vue2 @egjs/vue-flicking related issue ❓Question Asking question about @egjs/Flicking

Comments

@lazaroofarrill
Copy link

lazaroofarrill commented Oct 29, 2021

Description

the component works on dev mode but not in static mode. Items appear stacked on top of each other.

Steps to check or reproduce

<flicking
        :plugins="plugins"
        :options="{ circular: circular, moveType: 'snap', inputType: ['touch', 'mouse', 'pointer'], align: 'prev' }"
        :viewportTag="'div'"
        :cameraTag="'div'"
        ref="flicking">
        <slot></slot>
      </flicking>

"nuxt": "^2.15.7",
"@egjs/vue-flicking": "^4.3.1",

@lazaroofarrill lazaroofarrill changed the title Nuxt.js static site Nuxt.js static site not displaying component correctly Oct 29, 2021
@WoodNeck
Copy link
Member

Hello @lazaroofarrill!
I think that's Nuxt's issue that doesn't include our CSS file in the production build.
You can try their solution for including global CSS in their config file

@WoodNeck WoodNeck self-assigned this Oct 29, 2021
@WoodNeck WoodNeck added 🔖4.x v4.x~ related issue 📦Vue2 @egjs/vue-flicking related issue ❓Question Asking question about @egjs/Flicking labels Oct 29, 2021
@lazaroofarrill
Copy link
Author

Including then in the css section of nuxt.config.js didn't work. However importing them as regular stylesheets using the cdn did the trick. Thank you.

@FollowJack
Copy link

For everyone that faced this problem
In nuxt.config.js

css: [
'@egjs/flicking/dist/flicking.css',
'@egjs/flicking/dist/flicking-inline.css',
],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔖4.x v4.x~ related issue 📦Vue2 @egjs/vue-flicking related issue ❓Question Asking question about @egjs/Flicking
Projects
None yet
Development

No branches or pull requests

3 participants