# CLI + Minify config override

**URL:** <https://discourse.aurelia.io/t/cli-minify-config-override/2440>\
**Category:** Help Requests\
**Created:** [April 5, 2019, 3:52am UTC](https://discourse.aurelia.io/t/cli-minify-config-override/2440 "2019-04-05T03:52:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TylerJPresley](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/tylerjpresley/32/113_2.png) [@TylerJPresley](https://discourse.aurelia.io/u/TylerJPresley)\
**Post date:** [April 5, 2019, 3:52am UTC](https://discourse.aurelia.io/t/cli-minify-config-override/2440/1 "2019-04-05T03:52:06Z")

</div>

I can’t seem to get any minify config overrides for the CLI to work. If I’m reading everything correctly the following should work, but is not.

aurelia.json

```auto
"minify": {
    "dev": false,
    "prod": {
        "keep_classnames": true
    }
}

```

---

<div class="post-metadata">

**Author:** ![khuongduybui](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/khuongduybui/32/44_2.png) [@khuongduybui](https://discourse.aurelia.io/u/khuongduybui)\
**Post date:** [April 5, 2019, 11:39pm UTC](https://discourse.aurelia.io/t/cli-minify-config-override/2440/2 "2019-04-05T23:39:18Z")

</div>

What bundler are you using?  
I think webpack disrepects most of the aurelia.json configs.

---

<div class="post-metadata">

**Author:** ![TylerJPresley](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/tylerjpresley/32/113_2.png) [@TylerJPresley](https://discourse.aurelia.io/u/TylerJPresley)\
**Post date:** [April 5, 2019, 11:52pm UTC](https://discourse.aurelia.io/t/cli-minify-config-override/2440/3 "2019-04-05T23:52:01Z")

</div>

Base CLI Typescript/RequireJs

---

<div class="post-metadata">

**Author:** ![huochunpeng](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@huochunpeng](https://discourse.aurelia.io/u/huochunpeng)\
**Post date:** [April 6, 2019, 12:35am UTC](https://discourse.aurelia.io/t/cli-minify-config-override/2440/4 "2019-04-06T00:35:09Z")

</div>

The `keep_classnames` options is correctly passed to terser to minify the bundle file.

The reason for that not working is **there is not any class left after TypeScript compiling**.

For example, TS compiled app.ts to something like this

```auto
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var App = (function () {
    function App() {
        this.message = 'Hello World!';
    }
    return App;
}());
exports.App = App;

```

The `App` is not using class syntax anymore, it’s a function. Two possible solutions.

1. use `"keep_fnames": true`

- Tested, it works.

1. or, adjust tsconfig.json `compileOptions.target` to newer JS standard.
