-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrollup.config.js
More file actions
29 lines (21 loc) · 842 Bytes
/
rollup.config.js
File metadata and controls
29 lines (21 loc) · 842 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
import { terser } from 'rollup-plugin-terser';
import pkg from './package.json';
export default args => {
const configArray = args.configDefaultConfig;
const result = configArray.map(config => {
const plugins = config.plugins.map(plugin => {
if (plugin && plugin.name && plugin.name === 'terser') {
return terser({
format: {
comments: false,
preamble: `/* -> Script Loader v${pkg.version} | Build date: ${(new Date()).toISOString()} | Developer: ${pkg.author} | Copyright (c) CaffCode 2022. All Rights Reserved | https://caffcode.com <- */`
}
})
}
return plugin;
});
config.plugins = plugins;
return config;
});
return result;
};