web-infra-dev / rspress

🦀💨 A fast Rspack-based static site generator.
https://rspress.dev
MIT License
1.46k stars 137 forks source link

[Bug]: @rsbuild/plugin-vue does not work properly in rspress #1516

Closed LonelySnowman closed 1 month ago

LonelySnowman commented 1 month ago

Version

System: OS: Windows 10 10.0.19045 CPU: (16) x64 Intel(R) Core(TM) i7-10870H CPU @ 2.20GHz Memory: 3.88 GB / 15.78 GB Browsers: Edge: Chromium (127.0.2651.74) Internet Explorer: 11.0.19041.4355 npmPackages: rspress: ^1.33.1 => 1.33.1 @rsbuild/plugin-vue: ^1.0.1 => 1.0.1

Details

My rspress config:

import { defineConfig } from 'rspress/config';
import { pluginVue } from '@rsbuild/plugin-vue';

export default defineConfig({
    root: 'docs',
    outDir: 'dist',
    builderPlugins: [pluginVue()],
});

Run rspress dev export error:

Error: [VueLoaderPlugin Error] No matching use for vue-loader is found.
Make sure the rule matching .vue files include vue-loader in its use.

Reproduce link

https://github.com/LonelySnowman/rspress-vue-demo

Reproduce Steps

1.run npm install 2.run npm run dev 3.check the error

Timeless0911 commented 1 month ago

Rspress is a react-based static site generator.

LonelySnowman commented 1 month ago

@Timeless0911 大佬我看官网写的支持 Vue SFC。 Image Image

Timeless0911 commented 1 month ago

第一段的主语是 Vitepress 哈 第二段只是一个插件配置的示例,如果想要使用 Vue 进行渲染,还需要做很多额外的工作,社区贡献者有一个 https://www.npmjs.com/package/rspress-plugin-vue 包进行尝试,你可以尝试看看

https://github.com/web-infra-dev/rspress/issues/133#issuecomment-2345315812