Skip to content

🚀 Astro Next (0.21.0)#1406

Merged
matthewp merged 107 commits intomainfrom
next
Oct 29, 2021
Merged

🚀 Astro Next (0.21.0)#1406
matthewp merged 107 commits intomainfrom
next

Conversation

@drwpow
Copy link
Member

@drwpow drwpow commented Sep 21, 2021

🚀 Astro Next (0.21.0)

Hello! This PR showcases a huge change to Astro, namely the new Go/WASM compiler, and switch to Vite. So this will work a little differently from most PRs. This will be a long-running PR that other PRs get merged into (no pushes directly, please!).

👀 For Viewers

If you’re using this to track the status of astro@next--compiler

✨ Try it today

⚠️ We recommend starting with a new project! Trying to use on an existing Astro project will likely not work until we have full feature parity.

npm install astro@next--compiler

Examples Checklist - Complete, Linked

Status: started

  • blog (jn)
  • blog-multiple-authors (dp)
  • docs (jn)
  • framework-preact (mp)
  • framework-react (mp)
  • framework-svelte (mp)
  • framework-vue (mp)
  • framework-solid (mp)
  • framework-lit (mp)
  • framework-multiple (mp)
  • minimal (mp)
  • portfolio (jn)
  • starter (mp)
  • with-markdown (nm)
  • with-markdown-plugins (mp)
  • with-nanostores (mp)

Examples Checklist - Complete, Installed/Unlinked

Status: finished

🧩 Stability

Last updated: 2021-10-11

🔧 For Contributors

For people helping move astro@next--compiler closer to stable release

✅ Contributing checklist

This next branch will act as a sort of main until it’s ready to merge. So in that sense, we’ll require the following workflow here:

  • ✅ No commits directly to main. This should be enforced in GitHub.
  • ✅ All contributions to next must be PRs targeted against this branch
  • ✅ Your test suite must fully pass! (npm run test locally; ignore failing CI for now)

⏭ Moving to main

We’ll merge this PR into main when the Stability checklist above has been completed. Some items are intentionally left out, because they can be completed post-merge, with community involvement. This is including, but not limited to:

  • CSS bundling
  • Tailwind HMR
  • client:only
  • Allow using scripts in public/
    • Works as expected if not used within a page.
    • If used within a page the build fails.
  • Better astro build stats output
  • Fine-tuned build optimizations
  • Automatic <img> and srcset inclusion
  • Functional components in frontmatter
  • Drop TSX/JSX support in frontmatter/compiler now that functional components not needed
  • getStaticPaths() is no longer allowed to live further down the frontmatter
  • Migration errors/warnings (if a user has Snowpack config, warn! if a user has old settings, warn! etc. etc.)
  • with-tailwindcss (mp)
    • Build: Styles are not built, because there is no HTML scanning during the build.
    • This is being added.

@drwpow drwpow requested a review from a team as a code owner September 21, 2021 18:59
@withastro withastro deleted a comment from vercel bot Sep 21, 2021
@withastro withastro deleted a comment from vercel bot Sep 21, 2021
@withastro withastro deleted a comment from changeset-bot bot Sep 21, 2021
@natemoo-re natemoo-re mentioned this pull request Sep 21, 2021
23 tasks
@changeset-bot
Copy link

changeset-bot bot commented Sep 21, 2021

🦋 Changeset detected

Latest commit: 9f4e73f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@astrojs/prism Minor
astro Minor
@astrojs/markdown-remark Minor
@astrojs/renderer-lit Minor
@astrojs/renderer-preact Minor
@astrojs/renderer-react Minor
@astrojs/renderer-solid Minor
@astrojs/renderer-svelte Minor
@astrojs/renderer-vue Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 21, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

astro-www – ./www

🔍 Inspect: https://vercel.com/pikapkg/astro-www/9F4oZVDidkj8zFqAuwD8zvX15WjY
✅ Preview: Canceled

[Deployment for 4140001 canceled]

astro-docs – ./docs

🔍 Inspect: https://vercel.com/pikapkg/astro-docs/642V6taUCbAbvmtav5dCivZsNv9t
✅ Preview: Canceled

[Deployment for 4140001 canceled]

@vercel vercel bot temporarily deployed to Preview – astro-www September 21, 2021 19:58 Inactive
@vercel vercel bot temporarily deployed to Preview – astro-docs September 21, 2021 19:58 Inactive
@drwpow drwpow changed the title 🚀 Astro Next 🚀 Astro Next (0.21.0) Sep 21, 2021
@vercel vercel bot temporarily deployed to Preview – astro-docs September 21, 2021 20:12 Inactive
@vercel vercel bot temporarily deployed to Preview – astro-www September 21, 2021 20:13 Inactive
@vercel vercel bot temporarily deployed to Preview – astro-docs September 21, 2021 20:35 Inactive
@vercel vercel bot temporarily deployed to Preview – astro-www September 21, 2021 20:35 Inactive
@vercel vercel bot temporarily deployed to Preview – astro-www September 21, 2021 20:54 Inactive
@vercel vercel bot temporarily deployed to Preview – astro-docs September 21, 2021 20:54 Inactive
@brycewray
Copy link
Contributor

brycewray commented Sep 21, 2021

Bug report re this PR.

I created a brand new project and installed with npm install astro@next--compiler. Set up the standard Astro directory structure as in the docs and put the "minimal" example's index.astro file in ./src/pages/; also used the regular scripts from "minimal"'s package.json. On running npm run dev, I got the following output:

> astro-site@0.21.0 dev
> astro dev

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@astrojs/renderer-svelte' imported from /Users/thewrays/astro-site/node_modules/astro/dist/runtime/vite/config.jsError [ERR_MODULE_NOT_FOUND]: Cannot find package '@astrojs/renderer-svelte' imported from /Users/thewrays/astro-site/node_modules/astro/dist/runtime/vite/config.js

At the request of @drwpow I then tried ./node_modules/.bin/astro dev but got the same result.

Repo: https://github.com/brycewray/astro-site

matthewp and others added 10 commits October 27, 2021 14:28
* Prevent scanning a user's deps

* Remove unused things

* remove unused util
This does 2 things:

1. Adds prismjs as a dep.
2. Adds shiki as an external.
* fix(#1679): hoisted <script> rendering

* fix(#1679): do not print global for styles, but do for scripts

* fix: update ObjectSet implementation

* fix: dedupe elements in sets
* chore: update compiler

* chore: update compiler (again)
This should get the lit example working from `npm`.
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.