Skip to content

Instantly share code, notes, and snippets.

@MrRaindrop
Created December 19, 2016 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrRaindrop/97ddaebd3bf78d389275fe010b2fc34b to your computer and use it in GitHub Desktop.
Save MrRaindrop/97ddaebd3bf78d389275fe010b2fc34b to your computer and use it in GitHub Desktop.
js: rollup config.
import { rollup } from 'rollup'
import postcss from 'rollup-plugin-postcss'
import json from 'rollup-plugin-json'
import eslint from 'rollup-plugin-eslint'
import nodeResolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import buble from 'rollup-plugin-buble'
const pkg = require('../package.json')
const version = pkg.version
const date = new Date().toISOString().split('T')[0].replace(/\-/g, '')
var banner =
`console.log('this is a banner.')`;
export default {
entry: './src/entry',
dest: './dist/bundle.js',
banner,
format: 'iife',
moduleName: 'mod',
sourceMap: 'inline',
plugins: [
postcss(),
json(),
eslint({
exclude: ['./package.json', '**/*.css']
}),
nodeResolve({
jsnext: true,
main: true,
browser: true
}),
commonjs(),
buble()
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment