-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Update Astro docs to use v0.21 #1738
Update Astro docs to use v0.21 #1738
Conversation
|
The issue may be in how Astro is handling Vite aliases. cc @natemoo-re Example // astro.config.mjs
export default {
renderers: [],
vite: {
resolve: {
alias: {
'~': './src',
},
},
},
} ---
layout: ~/layouts/MainLayout.astro
title: Getting Started
description: A basic intro to Astro.
---
Astro is a modern static site builder. ---
// src/layouts/MainLayout.astro
---
<html>
<head>
</head>
<body>
<slot />
</body>
</html> https://stackblitz.com/edit/github-etyrwp?file=src%2Flayouts%2FMainLayout.astro&on=stackblitz
Example (using JS) <!-- src/pages/index.astro -->
<script type="module" src={Astro.resolve('../scripts/script-a.js')} /> // src/scripts/script-a.js
import fn from '~/components/script-b.js'
fn() // src/scripts/script-b.js
export default function Fn() {
document.title = 'Component loaded.'
}
https://stackblitz.com/edit/github-hp5d6g?file=src%2Fpages%2Findex.astro&on=stackblitz |
Is the PR description up-to-date? Is there anything still blocking this (the SVG issue has been fixed in the compiler right)? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! I'm excited to get the docs & www working w/ v0.21
(I assume there's still a few bugs tho)
Changes
This updates the Astro docs site to use Astro v0.21.
Testing
docs site only
Docs
docs site only