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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Compatible with Gridsome #11

Closed
Tragio opened this issue Nov 18, 2020 · 3 comments
Closed

Not Compatible with Gridsome #11

Tragio opened this issue Nov 18, 2020 · 3 comments

Comments

@Tragio
Copy link

Tragio commented Nov 18, 2020

Hello @igaloly! 馃檪

Thank you very much for your work and for this amazing plugin.

I was trying to use it for the first time with Gridsome but I have the following error when building gridsome build:
Screenshot 2020-11-18 at 14 19 47

However, when I use gridsome develop it works perfectly. I think this is due to SSR support but I have not figured out a way to put it working. https://gridsome.org/docs/assets-scripts/#without-ssr-support

I have the following code on main.js:

import VuePreloaders from 'vue-preloaders'

export default function(Vue, { router, head, isClient }) {
  Vue.component('Layout', DefaultLayout)
  Vue.use(VuePreloaders)
}

And the following code on layouts/Default.vue:

mounted() {
    const close = this.$preloaders.open({
      component: Preloader,
      cssStyle: {
        position: 'fixed'
      },
      overlayStyle: {
        background:
          'radial-gradient(circle, rgba(74,74,74,1) 0%, rgba(61,61,61,1) 100%)',
        opacity: 1
      }
    })
    setTimeout(close, 2000)
  }

Thank you very much!

@igaloly
Copy link
Owner

igaloly commented Dec 27, 2020

Hey @Tragio , Sorry for the delay :(
WIP

@igaloly
Copy link
Owner

igaloly commented Dec 27, 2020

Hi @Tragio ,
It seems like the problem solved in fix-ssr-build branch.
You need to import the styles file from dist folder in main.js as well.
In my tests, the builds were successfully completed and the static files were served as expected.
It'll be great if you will check and confirm :)
Waiting for your reply.

@Tragio
Copy link
Author

Tragio commented Dec 30, 2020

Hi @Tragio ,
It seems like the problem solved in fix-ssr-build branch.
You need to import the styles file from dist folder in main.js as well.
In my tests, the builds were successfully completed and the static files were served as expected.
It'll be great if you will check and confirm :)
Waiting for your reply.

All seems fine from my end. I'll let you know if anything comes up. Would be awesome if you could merge into master and perhaps add the above information on the README 馃槃. Really thank you for your work and support. Happy new year 馃巻

@Tragio Tragio closed this as completed Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants