Comments (5)
Good first issue!
This is an opportunity for astro users to learn about how astro works by fixing a small but real bug. You can expect to get help setting up the dev environment, and understanding the project structure in #dev
channel of our discord server (https://astro.build/chat).
What's the bug?
The functionPerRoute
config creates more functions than necessary.
What's going wrong here?
Adapters depend on Astro's Integration API to provide them with the routes to make functions out of. The routes are provided in a map called entrypoints
.
Neither Astro nor the vercel adapter make a distinction between prerendered and on-demand rendered routes - all are turned into functions. Only non-prerendered routes should be exposed to the adapter.
Where do I start looking?
The part where Astro's internals pass the entrypoints
map to the adapter is here:
astro/packages/astro/src/core/build/plugins/plugin-manifest.ts
Lines 98 to 106 in eb8bffe
The part where Astro's internals populate the entrypoints
map in the first place is here:
astro/packages/astro/src/core/build/plugins/plugin-ssr.ts
Lines 201 to 206 in eb8bffe
from astro.
Your example doesn't have prerendered pages. Please update the example to match the problem you're describing.
@matthewp Hello, the ouput is "hybrid", unless I'm mistaken all pages are prerendered by default, so the index.astro is a prerendered one.
from astro.
@lilnasy Thanks for providing guidance on this issue! I would like to give it a try π
from astro.
Your example doesn't have prerendered pages. Please update the example to match the problem you're describing.
from astro.
Hello @bentouch-digital. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro
will be closed if they have no activity within 3 days.
from astro.
Related Issues (20)
- Unexpected slow initial render when using "visibility: hidden" and "<label>" HOT 5
- Astro SSR doesn't render nested Vue components HOT 2
- Cannot deploy to Cloudflare Pages / __VUE_PROD_DEVTOOLS__ is not defined HOT 3
- When Chrome devtools is open the newly created site breaks HOT 1
- False positive for the `a11y-no-noninteractive-element-to-interactive-role` a11y audit HOT 1
- Astro.props is type as any when use Polymorphic HOT 8
- SSR Error: "require is not defined" with `@lexical/react` as dependency in Astro HOT 1
- The "page" prop in paginated dynamic routes doesnβt handle base URLs HOT 3
- Server crashes due to multiple runtime errors in Astro component (Astro + React) HOT 1
- (Non-security) Toolbar renders HTML included in props, potentially causing unintended script execution in dev mode
- Unable to `import` files in API routes in `@astrojs/vercel>7.0.0`
- @shikijs/twoslash doesn't work HOT 9
- Static/server rendering fails with Preact class components HOT 2
- filed in wrong repo. removed. sorry!
- Not enough contrast in notification level `info` with the app open.
- Redirects crash in SSR with certain characters in URL HOT 1
- Astro version >= 4.5.0 breaks app environmental variables HOT 18
- [Astro DB]: Table References does not work with `column.text` type.
- [Astro DB]: attempt to renew the same token indefinitely
- [Astro DB] fetch() response not handled properly
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 astro.