-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrollup.config.js
43 lines (41 loc) · 1.02 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
42
43
import babel from '@rollup/plugin-babel';
import eslint from '@rollup/plugin-eslint';
import resolve from '@rollup/plugin-node-resolve';
import { readFileSync } from 'fs';
const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8'));
const banner = `/*! ${pkg.name} v${pkg.version} | ${pkg.license} (c) ${new Date().getFullYear()} ${pkg.author.name}, (c) 2021 Chris Diana | ${pkg.homepage} */`;
export default [
{
input: 'src/client/main.js',
external: ['CMS'],
output: [
{
file: 'dist/cms.js',
name: 'CMS',
format: 'iife',
banner: banner,
},
{
file: 'examples/js/cms.js',
name: 'CMS',
format: 'iife',
banner: banner,
},
{
file: 'dist/cms.es.js',
name: 'CMS',
format: 'es',
banner: banner,
}
],
plugins: [
eslint(),
resolve(),
//commonjs(),
babel({
exclude: 'node_modules/**',
babelHelpers: 'bundled'
}),
],
}
];