-
Notifications
You must be signed in to change notification settings - Fork 25
/
rollup.config.js
34 lines (33 loc) · 1016 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
30
31
32
33
34
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import uglify from 'rollup-plugin-uglify-es'
import babel from 'rollup-plugin-babel'
import vue from 'rollup-plugin-vue'
import replace from 'rollup-plugin-replace'
import json from 'rollup-plugin-json'
export default {
entry: `src/index.js`,
dest: `dist/vue-mermaid.js`,
format: 'amd',
moduleName: 'VueMermaid',
plugins: [
json(),
vue({
css: true
}),
replace({
'process.env.NODE_ENV': JSON.stringify( 'production' )
}),
resolve({
browser: true,
extensions: ['.vue', '.js', '.json']
}), // tells Rollup how to find date-fns in node_modules
commonjs(), // converts date-fns to ES modules
babel({
exclude: 'node_modules/**' // only for sef src
}),
uglify()// minify, but only in production
],
external: ['vue','mermaid'],
sourceMap: false
}