ionic-example
ionic-example copied to clipboard
Add description on how to disable mangling
As already mentioned here https://github.com/typeorm/ionic-example/issues/27, please add a description on how to disable mangling for ionic 3 due to the following issue: https://github.com/typeorm/typeorm/issues/2164 I lost a lot of time because of this issue.
Description could be something like this: Disable mangling as described under the following link: https://ionicframework.com/docs/v3/developer-resources/app-scripts/
- Create a new file under ./config/uglifyjs.config
- Copy paste the following content
module.exports = {
/**
* mangle: uglify 2's mangle option
*/
mangle: false,
/**
* compress: uglify 2's compress option
*/
compress: {
toplevel: true,
pure_getters: true
}
};
- Add the path to the file under package.json like this:
....
"config": {
"ionic_uglifyjs": "./config/uglifyjs.config.js"
},
...