({
beautify,
inline = true,
}: {
beautify: boolean
inline?: boolean
})
| 1 | const nameCache = {} |
| 2 | |
| 3 | export const minifyConfig = ({ |
| 4 | beautify, |
| 5 | inline = true, |
| 6 | }: { |
| 7 | beautify: boolean |
| 8 | inline?: boolean |
| 9 | }) => ({ |
| 10 | parse: { |
| 11 | bare_returns: false, |
| 12 | ecma: 8, |
| 13 | html5_comments: false, |
| 14 | shebang: true, |
| 15 | }, |
| 16 | compress: { |
| 17 | global_defs: { |
| 18 | // __DEV__: false, |
| 19 | // 'process.env.NODE_ENV': 'production', |
| 20 | }, |
| 21 | arrows: true, |
| 22 | arguments: true, |
| 23 | booleans: true, |
| 24 | booleans_as_integers: true, |
| 25 | collapse_vars: true, |
| 26 | comparisons: true, |
| 27 | computed_props: true, |
| 28 | conditionals: true, |
| 29 | dead_code: true, |
| 30 | directives: true, |
| 31 | drop_console: false, |
| 32 | drop_debugger: true, |
| 33 | ecma: 8, |
| 34 | evaluate: true, |
| 35 | expression: true, //? |
| 36 | hoist_funs: true, //? |
| 37 | hoist_props: true, |
| 38 | hoist_vars: false, |
| 39 | if_return: true, |
| 40 | inline, |
| 41 | join_vars: true, //? |
| 42 | |
| 43 | defaults: false, |
| 44 | keep_classnames: false, |
| 45 | keep_fargs: false, |
| 46 | keep_fnames: false, |
| 47 | loops: true, |
| 48 | module: true, |
| 49 | properties: true, |
| 50 | pure_getters: true, |
| 51 | reduce_funcs: true, |
| 52 | reduce_vars: true, |
| 53 | sequences: true, |
| 54 | side_effects: true, |
| 55 | switches: true, |
| 56 | toplevel: true, |
| 57 | |
| 58 | typeofs: true, |
| 59 | unused: true, |
| 60 | passes: 3, |
no outgoing calls
no test coverage detected
searching dependent graphs…