-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
rollup.config.js
27 lines (26 loc) · 883 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
import path from 'path'
import pkg from './package.json'
import babel from 'rollup-plugin-babel'
import nodeResolve from 'rollup-plugin-node-resolve'
import { terser } from 'rollup-plugin-terser'
import analyze from 'rollup-plugin-analyzer'
import postcss from 'rollup-plugin-postcss'
import vue from 'rollup-plugin-vue'
import filesize from 'rollup-plugin-filesize'
export default {
input: './src/VueDT.vue',
output: [
{ file: pkg.browser, format: 'umd', name: pkg.name, plugins: [terser()] },
{ file: pkg.main, name: pkg.name, format: 'umd' },
{ file: pkg.module, format: 'esm' }
],
external: ['vue'],
plugins: [
babel(),
nodeResolve({ mainFields: ['module', 'main'] }),
postcss({ extract: path.resolve('./dist/vuedt.css'), minimize: { preset: 'advanced' }}),
vue({ css: false }),
analyze(),
filesize({ showBrotliSize: true }),
]
}