ionic-example icon indicating copy to clipboard operation
ionic-example copied to clipboard

Add description on how to disable mangling

Open simmue opened this issue 6 years ago • 0 comments

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/

  1. Create a new file under ./config/uglifyjs.config
  2. 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
  }
};
  1. Add the path to the file under package.json like this:
....
 "config": {
    "ionic_uglifyjs": "./config/uglifyjs.config.js"
  },
...

simmue avatar May 23 '19 12:05 simmue