forked from activeadmin/activeadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
52 lines (50 loc) · 1.37 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
44
45
46
47
48
49
50
51
52
import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import babel from "rollup-plugin-babel";
import { uglify } from "rollup-plugin-uglify";
import { stripIndent } from 'common-tags';
const uglifyOptions = {
mangle: false,
compress: false,
output: {
beautify: true,
indent_level: 2,
preamble: stripIndent`
/**
* Warning: This file is auto-generated, do not modify. Instead, make your changes in 'app/javascript/active_admin/' and run \`yarn build\`
*/
//= require jquery3
//= require jquery-ui/widgets/datepicker
//= require jquery-ui/widgets/dialog
//= require jquery-ui/widgets/sortable
//= require jquery-ui/widgets/tabs
//= require jquery-ui/widget
//= require jquery_ujs
//= require_self
` + '\n'
}
}
export default {
input: "app/javascript/active_admin/base.js",
output: {
file: "app/assets/javascripts/active_admin/base.js",
format: "umd",
name: "ActiveAdmin"
},
plugins: [
resolve(),
commonjs(),
babel(),
uglify(uglifyOptions),
],
// Use client's yarn dependencies instead of bundling everything
external: [
'jquery',
'jquery-ui/ui/widgets/datepicker',
'jquery-ui/ui/widgets/dialog',
'jquery-ui/ui/widgets/sortable',
'jquery-ui/ui/widgets/tabs',
'jquery-ui/ui/widget',
'jquery-ujs'
]
}