Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .nuxt-guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import { defineNuxtConfig } from 'nuxt'

// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
buildModules: [
modules: [
'@pinia/nuxt',
],
postcss: {
Expand Down Expand Up @@ -85,12 +85,14 @@ module.exports = {
}
```

Remove `require("@tailwindcss/line-clamp")`.

#### In App.vue

```vue
<script setup>
import { useStyleStore } from '@/stores/style.js'
import { darkModeKey, styleKey } from '@/config.js'
import { darkModeKey, styleKey } from '@/configs/config.js'

useHead({
titleTemplate: (titleChunk) => {
Expand Down Expand Up @@ -224,10 +226,20 @@ Then, wrap the entire template with `<div>` and replace `<LayoutGuest>` with `<N

## Replace `<RouterLink>` with `<NuxtLink>`

Details are coming soon...
Replace `RouterLink` with `NuxtLink` and put import from components:

```js
import { NuxtLink } from '#components'

//...
return NuxtLink;
//...
```

## Remove/update imports

Move `components/Charts/chart.config.js` to `configs/` directory. And update import as `import * as chartConfig from "~/configs/chart.config";`.

Nuxt automatically imports any components in your `components/` directory. So, you may safely remove that imports from `<script setup>`. The only exception is for `components/Charts`, so charts import should be left as is.

## Contributions open
Expand Down