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

include optionsを上書きさせたい #4

Open
shinGangan opened this issue Oct 10, 2023 · 1 comment
Open

include optionsを上書きさせたい #4

shinGangan opened this issue Oct 10, 2023 · 1 comment
Assignees

Comments

@shinGangan
Copy link
Owner

shinGangan commented Oct 10, 2023

内容

以下のような設定を行った。

// nuxt.config.ts

import { createResolver } from "nuxt/kit";
const { resolve } = createResolver(import.meta.url);

export default defineNuxtConfig({
  // ... other options
  pandacss: {
    include: [
      resolve(`./src/components/**/*.{vue,ts,tsx}`),
      resolve(`./src/layouts/**/*.{vue,ts,tsx}`),
      resolve(`./src/pages/**/*.vue`),
    ],
    exclude: [],
  },
});

すると以下のような出力結果となった。

// .nuxt/panda.config.mjs

import { defineConfig } from "@pandacss/dev"

export default defineConfig({
  "preflight": true,
  "include": [
    "/{...}/src/components/**/*.{vue,ts,tsx}",
    "/{...}/src/layouts/**/*.{vue,ts,tsx}",
    "/{...}/src/pages/**/*.vue",
    "/{...}/src/components/**/*.{js,jsx,ts,tsx,vue}",
    "/{...}/src/pages/**/*.{js,jsx,ts,tsx,vue}"
  ],
  "exclude": [],
  "outdir": "styled-system",
  "cwd": "/{...}/src/.nuxt",
  "cssPath": "/{...}/src/.nuxt/panda.css",
})

/pages/componentsは上書きされている想定だった。実際には違った。

@shinGangan shinGangan self-assigned this Oct 10, 2023
@shinGangan
Copy link
Owner Author

Q. 上書きさせるべきか、それともそのままにしておくか。

includeは監視オプションであることを踏まえると、上書きされる方が適切かと思ってる。

https://panda-css.com/docs/references/config#include

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

No branches or pull requests

1 participant