Skip to content
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

feat: add Nuxt template #61

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

userquin
Copy link
Member

@userquin userquin commented Oct 20, 2024

This PR includes the following templates:

  • nuxt-base: Nuxt template for Nuxt v3 and Nuxt v4 compat using vite-plugin-vuetify and vuetify-nuxt-module
  • nuxt-default: Nuxt template for Nuxt v3 and Nuxt v4 compat using vite-plugin-vuetify and vuetify-nuxt-module
  • nuxt-essentials: Nuxt template for Nuxt v3 and Nuxt v4 compat using vite-plugin-vuetify and vuetify-nuxt-module (using Nuxt layouts))

When using vite-vuetify-plugin, the template will include a custom Nuxt module to register some Nuxt stuff (SASS + Vue transformAssetUrls and SASS moder-compiler): the styles plugins is disabled and included a custom one extracted from vuetify-nuxt-module (we need SASS variables working when SSR enabled avoiding missing sources).

✔️ (fixed) Righ now this PR in draft since I'm getting weird error when starting dev server using both, vite-plugin-vuetify and vuetify-nuxt-module. I'll check if the problem is about enabling Nuxt ESLint (check the error below).

/cc @danielroe @johnleider @KaelWD @jacekkarczmarczyk

nuxt-essentials error

imagen

subtitle="Explore available framework Features."
target="_blank"
title="Features"
variant="text"
Copy link
Member Author

@userquin userquin Oct 20, 2024

Choose a reason for hiding this comment

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

We should using NuxtLink with custom attr for this.

Maybe we should add some example about using :to with some list or button, we've still a draft PR to use NuxtLink programaticaly.

/cc @KaelWD I talk with some friend about nested tabs using :to and the problem is the scope. Secondary tabs links shouldn't be reactive, in that case otherwise we will get some errors breaking the navigation.

Top Nav. A and B. Then inside B navigate to some child (Toolbar B) and then navigating to some Tab in A => error.

Choose a reason for hiding this comment

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

I confirm I got issues by using tabs links with nested routes.
I resolve effectively by using nuxtlink around tabs links

Copy link
Member Author

Choose a reason for hiding this comment

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

In the template here, we are using external links, we can use nuxt link or just the link directly in the card.

The problem is about routing inside the app.

@userquin
Copy link
Member Author

userquin commented Oct 20, 2024

The error seems to be a problem with pnpm, using npm as package manager works: I'm going to check using shamefully-hoist, strict-peer-dependencies and auto-install-peers

EDIT: adding typescript or eslint module not working with pnpm

EDIT: removing the vite vue jsx plugin registration and imports in @nuxt/vite-builder works

DON'T INSTALL eslint dependency when installing Nuxt ESLint module via Nuxi CLI.

chore: add `@mdi/font` dev dependency
chore: add `@mdi/font` css to nuxt css entry when using vuetify vite plugin
chore: add `vuetify/styles` to nuxt css entry when using vuetify vite plugin
chore: enable auto import when using vuetify vite plugin
@userquin userquin marked this pull request as ready for review October 20, 2024 16:02
chore: don't add `vuetify/styles` when using nuxt module
@johnleider johnleider added the enhancement New feature or request label Oct 20, 2024
src/utils/nuxt/types.ts Outdated Show resolved Hide resolved
src/utils/nuxt/utils.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants