Questions tagged [nuxt-edge]

9 questions
24
votes
4 answers

How to add a polyfill to nuxt 2.0?

In Nuxt 1.4.2, I had the following in my nuxt.config.js: build: { vendor: ['babel-polyfill'], babel: { presets: [ ['vue-app', { useBuiltIns: true, targets: { ie: 11, uglify: true }, }, ], ], }, }, It…
David Weldon
  • 63,632
  • 11
  • 148
  • 146
7
votes
2 answers

How to use webpack dev proxy with Nuxt

Using Nuxt to develop a universal JS app, I'm attempting to configure webpack's dev proxy so that, in development only, requests to /api get proxied to http://127.0.0.1:500/api where they'll reach a Python REST API. Following the Nuxt docs, I've…
Collin Allen
  • 4,449
  • 3
  • 37
  • 52
6
votes
2 answers

Why nuxtServerInit is called multiple times on site load

I am working on nuxt-edge + auth.nuxt + vuex project and in the nuxtServerInit method of the store I am only logging a message in the console. When the site is reloaded the message gets printed multiple times. This seems to happen only in dev mode.
Slim
  • 1,924
  • 1
  • 11
  • 20
4
votes
2 answers

How can I transpile a dependency in node_modules with Nuxt 2?

I have read of issues with transpiling node_modules with Nuxt, but the new Nuxt 2 is said to have solved this with a transpile option in the nuxt.config.js file. https://nuxtjs.org/api/configuration-build/#transpile Here is what I have: export…
Michael Giovanni Pumo
  • 14,338
  • 18
  • 91
  • 140
3
votes
3 answers

Add a slask / at the end of every routes in Nuxt.js

For a purpose of SEO i've been asked to add a slash at the end of every routes of my nuxt project. For example myapp.com/company should be myapp.com/company/ Is there a clean way to do that in Nuxt ?
yoyojs
  • 1,723
  • 5
  • 24
  • 41
2
votes
1 answer

Property 'x' does not exist on type '{toggle():void}'

I am pretty new to typescript. Now, I have setup nuxt(bridge with typescript) app and created a component named menuIcon as such;
2
votes
2 answers

Every page's styles are loaded on homepage after upgrading to Nuxt 2

After upgrading to Nuxt.js 2, I noticed that about 30 CSS files are loaded when the homepage loads. I actually noticed it when I checked Google Pagespeed Insights and saw about 30 "blocking CSS resources". Is there any setting for lazy loading them…
user9801251
1
vote
1 answer

What nginx server config exactly should be for Nuxt.js Universal project?

I've got big troubles with deploy my nuxt.js project on Ubuntu with Nginx; Ubuntu 18.04 + nginx Nuxt.js 2.3.2 (universal mode) So maybe somebody can help me to resolve my problem) I will to describe all things around this problem below: My…
0
votes
1 answer

Hot to define global middleware in nuxt-edge (Nuxt 2)

middleware property on single page or layout works as expected. But when I trying to defined middleware for every page using nuxt.config.js then middleware is not executed. Using { router: { middleware: 'foo'} }
farincz
  • 4,943
  • 1
  • 28
  • 38