The Vue 2 plugin provides support for Vue 2 SFC (Single File Components). The plugin internally integrates vue-loader v15.
You can install the plugin using the following command:
You can register the plugin in the rsbuild.config.ts file:
After registering the plugin, you can directly import *.vue files in your code or use Vue's JSX syntax without the need for additional configuration.
If you need to customize the compilation behavior of Vue, you can use the following configs.
Options passed to vue-loader, please refer to the vue-loader documentation for detailed usage.
VueLoaderOptionsThe Vue 2 plugin is using the vue-loader v15. Please be aware that there may be configuration differences between v15 and the latest version.