Created
December 19, 2016 12:39
-
-
Save MrRaindrop/97ddaebd3bf78d389275fe010b2fc34b to your computer and use it in GitHub Desktop.
js: rollup config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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