forked from dystudio/vue-keycloak-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
30 lines (27 loc) · 848 Bytes
/
rollup.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import babel from 'rollup-plugin-babel'
import pkg from './package.json'
const version = process.env.VERSION || require('./package.json').version
const banner =
`/*!
* vue-keycloak-js v${version}
* @license ISC
*/`
const name = 'dsb-vue-keycloak'
// CommonJS (for Node), ES module (for bundlers) and browser-friendly UMD build.
export default {
input: 'src/index.js',
output: [
{ file: pkg.main, format: 'cjs', banner, name },
{ file: pkg.module, format: 'es', banner, name },
{ file: pkg.browser, format: 'umd', banner, name }
],
plugins: [
resolve(), // so Rollup can find `keycloak-js`
commonjs(), // so Rollup can convert `keycloak-js` to an ES module
babel({
exclude: ['node_modules/**']
})
]
}