Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example for `rollup-plugin-vue`
Create a module for vue component.
<div class="hello">
<h1 class="hello__title">{{ msg }}</h1>
export default {
data () {
return {
msg: 'Hello World!'
<style lang="stylus">
.hello {
&__title {
color: #42b983;
import Hello from './Hello.vue'
export default Hello
"name": "test-rollup-plugin-vue",
"version": "1.0.0",
"devDependencies": {
"rollup-plugin-buble": "^0.14.0",
"rollup-plugin-commonjs": "^5.0.4",
"rollup-plugin-node-resolve": "^2.0.0",
"rollup-plugin-vue": "^2.2.3"
import vue from 'rollup-plugin-vue';
import babel from 'rollup-plugin-buble';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
export default {
moduleName: 'hello',
entry: 'index.js',
dest: 'dist/bundle.js',
format: 'iife',
plugins: [
jsnext: true,
main: true,
browser: true,
vue({compileTemplate: true}),

This comment has been minimized.

Copy link
Owner Author

@znck znck commented Sep 26, 2016

Dumping terminal history

➜  test-rollup-plugin-vue system_profiler SPSoftwareDataType

    System Software Overview:

      System Version: macOS 10.12 (16A323)
      Kernel Version: Darwin 16.0.0
      Boot Volume: Zero
      Boot Mode: Normal
      Computer Name: Rahul’s MacBook Pro
      User Name: Rahul Kadyan (znck)
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 3 days 20:45

➜  test-rollup-plugin-vue npm install
............. // Output removed.

➜  test-rollup-plugin-vue npm ls --depth=0
test-rollup-plugin-vue@1.0.0 ~/wrecked/test-rollup-plugin-vue
├── rollup-plugin-buble@0.14.0
├── rollup-plugin-commonjs@5.0.4
├── rollup-plugin-node-resolve@2.0.0
└── rollup-plugin-vue@2.2.3

➜  test-rollup-plugin-vue npm -v

➜  test-rollup-plugin-vue node -v

➜  test-rollup-plugin-vue rollup -v
rollup version 0.35.7

➜  test-rollup-plugin-vue rollup -c
dist/bundle.css 49 B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment