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

ERROR: No loader is configured for ".vue" files // vitepress #16785

Closed
MikeCZ23 opened this issue May 8, 2024 Discussed in #16763 · 1 comment
Closed

ERROR: No loader is configured for ".vue" files // vitepress #16785

MikeCZ23 opened this issue May 8, 2024 Discussed in #16763 · 1 comment
Labels

Comments

@MikeCZ23
Copy link

MikeCZ23 commented May 8, 2024

Discussed in #16763

Originally posted by MikeCZ23 May 6, 2024
ERROR: No loader is configured for ".vue" files
or help me with installation on Vitepress

EDIT: okay, i think solved, but

How i can switch theme? dark/light (css); import all css lib

how can I incorporate Component?
e.g.: Lorem impum <button /> lorem impum

//.vitepress/config.mts
import { defineConfig } from 'vitepress'
...
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'

export default defineConfig({ 
vite: {
    plugins: [
      AutoImport({
        include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
        resolvers: [ElementPlusResolver()],
      }),    
      Components({
        dirs: ['components'],
        include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
        resolvers: [ElementPlusResolver()]
      })
    ],
    ssr: { noExternal: ['element-plus'] },
    css: {
      postcss: {
        plugins: [
          {
            postcssPlugin: 'internal:charset-removal',
            AtRule: {
              charset: (atRule) => {
                if (atRule.name === 'charset') {
                  atRule.remove();
                }
              }
            }
          }
        ]
      }
    },
...
```</div>
Copy link

github-actions bot commented May 8, 2024

Hello @MikeCZ23, your issue has been closed because it does not conform to our issue requirements. Please use the Issue Helper to create an issue, thank you!

你好 @MikeCZ23,为了能够进行高效沟通,我们对 issue 有一定的格式要求,你的 issue 因为不符合要求而被自动关闭。你可以通过 issue 助手 来创建 issue 以方便我们定位错误。谢谢配合!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant