{"id":22283,"library":"rollup-plugin-vue2","title":"rollup-plugin-vue2","description":"Rollup plugin for Vue 2.0 components that precompiles templates using vue-template-compiler and transforms .vue files into JavaScript. Version 0.8.1 is the stable release. The plugin is not actively maintained and is a subset of rollup-plugin-vue, which also supports Vue 2 and is better maintained. It requires additional plugins for handling CSS imports and transpilation. Supports ES6 transpilation via rollup-plugin-buble or rollup-plugin-babel. No support for hot-reload.","status":"maintenance","version":"0.8.1","language":"javascript","source_language":"en","source_url":"https://github.com/thgh/rollup-plugin-vue2","tags":["javascript","rollup-plugin","vue","vue2","template-compiler"],"install":[{"cmd":"npm install rollup-plugin-vue2","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-vue2","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-vue2","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for compiling Vue templates","package":"vue-template-compiler","optional":false},{"reason":"recommended to handle CSS imports from .vue files","package":"rollup-plugin-css-only","optional":true},{"reason":"alternative to handle CSS imports","package":"rollup-plugin-postcss","optional":true},{"reason":"alternative to handle SCSS imports","package":"rollup-plugin-scss","optional":true}],"imports":[{"note":"Default export is a function. ESM imports supported; CommonJS require works as well.","wrong":"const vue = require('rollup-plugin-vue2')","symbol":"default","correct":"import vue from 'rollup-plugin-vue2'"}],"quickstart":{"code":"// rollup.config.js\nimport vue from 'rollup-plugin-vue2';\nimport css from 'rollup-plugin-css-only';\nimport buble from 'rollup-plugin-buble';\nimport nodeResolve from 'rollup-plugin-node-resolve';\nimport commonjs from 'rollup-plugin-commonjs';\n\nexport default {\n  entry: 'src/main.js',\n  dest: 'dist/bundle.js',\n  sourcemaps: true,\n  plugins: [\n    vue(),\n    css(),\n    buble(),\n    nodeResolve({ browser: true, jsnext: true, main: true }),\n    commonjs()\n  ]\n};","lang":"javascript","description":"Shows a basic Rollup configuration using vue plugin with CSS and Bublé transpilation."},"warnings":[{"fix":"Replace with rollup-plugin-vue (supports Vue 2 and is better maintained).","message":"The plugin is not actively maintained; use rollup-plugin-vue instead.","severity":"deprecated","affected_versions":">=0.0.1"},{"fix":"Add rollup-plugin-css-only, rollup-plugin-postcss, or rollup-plugin-scss to your Rollup config.","message":"CSS from .vue files is not handled automatically; you must include a CSS plugin.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Place vue() before buble() or babel() in the plugins array.","message":"Order of plugins matters: vue() should be before transpilers like Bublé or Babel.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Use rollup-plugin-vue if hot-reload is needed.","message":"No support for vue-hot-reload-api; HMR does not work.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Add vue() plugin to rollup.config.js plugins array.","cause":"Missing Rollup plugin to handle .vue files.","error":"Error: Could not resolve './App.vue' from 'src/main.js'"},{"fix":"Ensure vue() plugin is configured and imported correctly.","cause":"The .vue file is not being processed by any plugin.","error":"Error: Unexpected token (1:0) in file 'src/App.vue'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}