I’m following closely to this feature (https://nuxtjs.org/blog/nuxt-static-improvements/#generate-time-cache-vs-full-webpack-build) I may be getting this wrong, but I hope to clarify if I can use this feature correctly. Basically, I want to skip the webpack build as highlighted in the article, and build my pages through nuxt generate. The thing is that my data source usually changes, but my site code does not,
Tag: nuxt.js
Display different video source according to screen size
I am trying to load different videos according to the screen size. I found a solution to doing this using javascript. However, I am not able to integrate this code into nuxt.js. Working Code: HTML JAVASCRIPT The Fiddle: https://jsfiddle.net/j78w36er/2/ I tried to integrate like this: I would be very thankful for any kind of help! Answer Your code is primarily
ECONNREFUSED when dispatch action in nuxtServerInit
I am converting my Nuxt application to SSR – because I want to use nuxtServerInit and asyncData. These are the steps I have taken to convert it. Remove ssr: false from nuxt.config.js Dispatch actions to initialize store’s state in nuxtServerInit inside store/index.js Now my nuxt.config.js looks like this And the store/index.js looks like this. But after I restarted the development
Nuxt.js dynamic component error “Either pre-compile the templates into render functions, or use the compiler-included build”
I’m getting the following error in Nuxt.js: I was following the examples here: https://stackoverflow.com/a/39519105 and my RenderPost.vue roughly looks like this: I added the <client-only> because I was also getting error about server and client not matching up. Without it, I get an additional error that says: Answer Nuxt normally includes the Vue runtime only (excludes the compiler) as an
How to use mixins in Nuxt.js app with nuxt-property-decortor
I have used Nuxt.js in my latest project, and the language is TypeScript. Also, I’m using nuxt-property-decorator. I’m trying to understand the ‘mixins’ property in the following code. mixins.vue ↓ mixin.ts↓ I was expecting “Hello worlds!” in the output, but an error occurred: Could anyone advise me? Answer The mixin must be decorated with @Component:
Prevent click event in Vue conditonally
I am disabling document body scroll when my mobile nav is open which is working as expected. However it was not removing the overflow hidden when user would click a link to another route/page. I created a simple method to remove the overflow hidden when a link is clicked in the nav when the menu is open, which does work
“Invalid URL” error for markdown file using Nuxt content module
I’m working on a Nuxt site using the built in content module, and running locally, everything works fine. However, when I attempt to build the site by running nuxt generate, I get a fatal error on the first markdown file that says Invalid URL. My markdown files are in the /content/posts directory, and the name of this one is structured
Component vue-multiselect- doesn’t fetch value on load
When loading a component, I need to select the value in the drop-down list I’m trying to make my code friends with vue-multiselect found a similar topic – however, nothing appears in the field – if you then select a value, everything works correctly link in fact, I have to download via axios, the mini version looks like this but
Configure Vue loader and lazysizes to transform urls with Nuxt
I’m trying to configure lazysizes with Nuxt and my urls are not handled by Webpack so I get a 404 error. I get the path src=”~/assets/img.png” instead of src=”/_nuxt/assets/img.png”. I added lazysizes as an npm package and the following to my nuxt.config.js file. And this content to the plugins/lazysizes.client.ts For minimal reproduction, I just use a very simple image like
Keycloak with nuxt-auth module
I’m using this auth-module with Keycloak. My configuration in nuxt.config.js: The connection is OK. When I click on the “connect” button, I am redirected to my Keycloak environment. Once authenticated by Keycloak, I am redirected to my nuxt.js application. However, the problem is that my store is empty. Do you have any ideas about what causes this problem? loggedIn: is