-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathrollup.config.js
More file actions
33 lines (31 loc) · 866 Bytes
/
Copy pathrollup.config.js
File metadata and controls
33 lines (31 loc) · 866 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 babel from '@rollup/plugin-babel';
import resolve from '@rollup/plugin-node-resolve';
import commonJs from '@rollup/plugin-commonjs';
import typescript from '@rollup/plugin-typescript';
const packageJson = require('./package.json');
const extensions = ['.js', '.jsx', '.ts', '.tsx'];
const banner = `
/*!
* vue-virtual-sortable v${packageJson.version}
* open source under the MIT license
* ${packageJson.homepage}
*/
`;
export default {
input: 'src/index.tsx',
output: [
{
format: 'es',
file: packageJson.module,
banner: banner.replace(/\n/, ''),
},
{
format: 'cjs',
file: packageJson.main,
exports: 'default',
banner: banner.replace(/\n/, ''),
},
],
external: ['vue', 'sortable-dnd'],
plugins: [resolve(), commonJs(), typescript(), babel({ extensions, babelHelpers: 'bundled' })],
};