-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathrollup.config.prod.js
More file actions
33 lines (32 loc) · 796 Bytes
/
rollup.config.prod.js
File metadata and controls
33 lines (32 loc) · 796 Bytes
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
import buble from '@rollup/plugin-buble'
import commonjs from '@rollup/plugin-commonjs'
import replace from '@rollup/plugin-replace'
import { terser } from 'rollup-plugin-terser'
import vue from 'rollup-plugin-vue'
export default commandLineArgs => {
return {
input: 'src/index.js',
plugins: [
commonjs(),
replace({
'process.env.NODE_ENV': JSON.stringify('production')
}),
vue({
css: true,
compileTemplate: true,
template: {
isProduction: true,
optimizeSSR: commandLineArgs.format === 'cjs'
}
}),
buble({
objectAssign: 'Object.assign'
}),
commandLineArgs.format === 'iife' && terser()
],
output: {
name: 'VueAnnouncer',
exports: 'named'
}
}
}