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
"minify": {
"dev": false,
"prod": {
"keep_classnames": true
}
}
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
"minify": {
"dev": false,
"prod": {
"keep_classnames": true
}
}
What bundler are you using?
I think webpack disrepects most of the aurelia.json configs.
Base CLI Typescript/RequireJs
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
"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.
"keep_fnames": true
compileOptions.target
to newer JS standard.