Skip to content

Commit 7381e58

Browse files
committed
New config to dist build
1 parent 9ce47b3 commit 7381e58

File tree

1 file changed

+11
-35
lines changed

1 file changed

+11
-35
lines changed

rollup.config.prod.js

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,22 @@
1-
import resolve from 'rollup-plugin-node-resolve'
2-
import replace from 'rollup-plugin-replace'
3-
import VueLoader from 'rollup-plugin-vue'
4-
import butternut from 'rollup-plugin-butternut'
51
import buble from 'rollup-plugin-buble'
2+
import commonjs from 'rollup-plugin-commonjs'
3+
import { terser } from 'rollup-plugin-terser'
4+
import vue from 'rollup-plugin-vue'
65

76
export default {
87
input: 'src/index.js',
98
plugins: [
10-
VueLoader({
9+
commonjs(),
10+
vue({
1111
compileTemplate: true
1212
}),
1313
buble({
14-
objectAssign: 'Object.assign',
15-
jsx: 'h'
14+
objectAssign: 'Object.assign'
1615
}),
17-
butternut(),
18-
resolve({
19-
jsnext: true,
20-
main: true,
21-
browser: true
22-
}),
23-
replace({
24-
'process.env.NODE_ENV': JSON.stringify('production')
25-
})
16+
terser()
2617
],
27-
output: [
28-
{
29-
file: 'dist/vue-announcer.cjs.js',
30-
format: 'cjs'
31-
},
32-
{
33-
file: 'dist/vue-announcer.es.js',
34-
format: 'es'
35-
},
36-
{
37-
file: 'dist/vue-announcer.amd.js',
38-
format: 'amd'
39-
},
40-
{
41-
name: 'VueAnnouncer',
42-
file: 'dist/vue-announcer.js',
43-
format: 'umd'
44-
}
45-
]
18+
output: {
19+
name: 'VueAnnouncer',
20+
exports: 'named'
21+
}
4622
}

0 commit comments

Comments
 (0)