Comments (3)
The plugin should be executed twice.
- First server request, browser requests
/
and plugin executes, printing:'test plugin'
- Server sends
Location: /welcome
to browser and a 302 response. - Browser makes second request to server for
/welcome
and plugin executes on server, printing:'test plugin'
- Now server responds to the second request with HTML and a 200 response.
This is expected, and correct behaviour.
You are also encountering a known issue in development mode where the very first request to the Vite dev server results in two hits. A fix would be appreciated but it's quite a small issue.
from nuxt.
@danielroe thanks for this great explanation!
from nuxt.
Start a new pull request in StackBlitz Codeflow.
from nuxt.
Related Issues (20)
- Dynamic Menu Generation Based on Directory or Route Configuration in Nuxt 3 SSR HOT 1
- [useFetch] Component is already mounted, please use $fetch instead. See https://nuxt.com/docs/getting-started/data-fetching HOT 13
- Problem with route rules in nuxt.config HOT 3
- How to copy file to folder .output after build(2) HOT 2
- Decode function for useCookie called for every cookie present
- Docs: Cannot get API Docs for nuxt.config.ts HOT 2
- Wrong status codes in server plugins HOT 3
- autoImport for utils directory doesn't work correctly. HOT 6
- Reactive object does not trigger asyncData HOT 1
- <script setup> does not run on Pages which where navigated to by <NuxtLink> HOT 2
- Compressing response breaking error page HOT 2
- Cannot set properties of null (setting '__vrv_devtools') HOT 5
- [Performance] Using this.$route inside a computed triggers reactivity while we are changing pages HOT 10
- PublicRuntimeConfig type not being recognized by eslint, only happens after nuxt 3.11.2 HOT 2
- 在文件内容没有变化的情况下,每次打包出来的构建产物javascript文件的hash值都不一致 HOT 5
- PostCSS breaking on adding tailwind plugin for nuxt-tour specifically, unable to start nuxt dev server HOT 3
- _How to run "useLazyAsyncData" on client-side only?_ Use the "clientSide" option. For example: Nuxt.useLazyAsyncData(objects, { clientSide: true }); HOT 2
- iOS white screen while swiping back after scrolling HOT 1
- Add example to NuxtLink documentation for passing params to dynamic routes
- Vite Pre-transform error: on Nuxt 3.11 with images in public directory with query param HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt.