-
Notifications
You must be signed in to change notification settings - Fork 75
/
rollup.config.js
41 lines (36 loc) · 1.06 KB
/
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
35
36
37
38
39
40
41
import vue from 'rollup-plugin-vue';
import buble from 'rollup-plugin-buble';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import { rollup } from 'rollup';
import { default as vueConfig, pack } from './config/rollup-plugin-vue.config';
import bubleConfig from './config/buble.config';
let desc = '.runtime';
if (process.argv.pop() === '--compiler') {
vueConfig.compileTemplate = false;
desc = '';
};
let cache;
let banner =
'/*!\n' +
' * Vddl.js v' + pack.version + '\n' +
' * (c) ' + new Date().getFullYear() + ' Hejx\n' +
' * Released under the MIT License.\n' +
' * ' + pack.homepage + '\n' +
' */\n';
const config = {
entry: 'src/install.js',
targets: [
{ format: 'es', dest: `dist/${pack.name}${desc}.esm.js` },
{ format: 'cjs', dest: `dist/${pack.name}${desc}.common.js` },
{ format: 'umd', dest: `dist/${pack.name}${desc}.js`, moduleName: 'DragAndDropList' },
],
plugins: [
vue(vueConfig),
buble(bubleConfig),
],
useStrict: false,
cache,
banner,
};
export default config;