Repository navigation
feat: make asyncData works with <script setup nuxt> - #220
Conversation
|
Ah, don't we have |
|
Awesome! I think we also need to implement webpack plugin before being ready to merge :)
Private repos on gh free don't have it. This is only way to have unlimited contribs on private repo... |
|
So we will need to write plugins for vite and webpack separately right? Do we have any plan to make a somewhat transform layer so we can share the logics? |
|
@antfu Yes we need both. In the future might make some utils (in unjs) to make it easier creating cross webpack-vite plugins |
|
Should be done now. Do we need to add tests for it? |
|
Tests would be great - maybe a page in the basic fixture? I'm experiencing the following issue (on client-side) - reproducible with example project: |
This is what nuxt/nuxt#11043 is talking about, and already been there before this PR 👀 |
|
Great work @antfu it looks really sexy to use 😍 I am thinking of exposing also |
|
@atinux It is already exposed from both (nuxt/bridge#120) |
|
I was thinking of supporting: import { asyncData, $fetch } from '@nuxt/app' |
|
@atinux Seems a good idea to have but let's first have useFetch composable to see how common it is directly using |
asyncData works with <script setup>asyncData works with <script setup nuxt>
asyncDataworks with<script setup><script nuxt setup>syntax:Just a quick and dirty support, just proposing this idea, feel free to close if you don't like it.