-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Error: "regeneratorRuntime is not defined" with Import Wrappers #21
Comments
Can you try to use relative imports instead of If this still doesn't work a reproduction CodeSandbox would be great! Thx! |
Nope, still no luck with relative imports. I need more time to strip out unrelated stuff and provide CodeSandbox. |
Maybe you can try to do a regular dynamic import |
Here is CodeSandbox: https://codesandbox.io/s/gridsomelazyhydration-3deeh I'm really bad at Babel and Webpack yet. Any clue would be much appreciated. |
Thanks for the CodeSandbox link. Unfortunately it does not work for me. |
Yes, regular async component injection works: components: {
AnotherStaticBlock: () => import('~/components/AnotherStaticBlock.vue')
} Import Wrapper doesn't. I also have public repo for this example. It would be great if you could look at it. Thank you! |
I have the same problem, with Nuxt@2.7.1 and Vue@2.6.10 |
@LuXDAmore please provide a reproduction link. I just tested it: fresh install with latest version of |
I found a solution to this. The problem has to do with Babel not including all polyfills by default. So a freshly installed Nuxt.js seems to have all necessary polyfills but Gridsome (and maybe Nuxt.js with customized Babel settings) does not. I'll release a new version the next couple of days. |
Thank You @maoberlehner , I have this configuration in my project. DOCS Hope this helps. 😄 |
@maoberlehner I have to reopen this issue, because I would like to know how can I use with async component factory https://vuejs.org/v2/guide/components-dynamic-async.html#Handling-Loading-State ? Like @Al-Rozhkov wrote, the regular async component injection works, but with this wrapper not. |
First of all thank you for this project! Feels like must have for every vue based SSG. 👍
I tried vue-lazy-hydration with Gridsome. There is pretty large block of "static" markup without reactive data. Looks like perfect case for
ssr-only
property. It works perfectly with<LazyHydrate ssr-only>
component, but when I tried Import Wrappers I got an error:Chrome and Firefox, Vue 2.6.10
Here is my code:
The text was updated successfully, but these errors were encountered: