Skip to content

Instantly share code, notes, and snippets.

/**
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ==================
*
* This patch works around iOS9 UIWebView regression that causes infinite digest
* errors in Angular.
*
* The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular
* have the workaround baked in.
*
* To apply this patch load/bundle this file with your application and add a
@IgorMinar
IgorMinar / angular-cli-vendor-sourcemaps.patch
Created March 22, 2017 17:57
Patch @angular/[email protected] to enable vendor source maps
--- common.js.orig 2017-03-22 10:53:54.000000000 -0700
+++ common.js 2017-03-22 10:54:37.000000000 -0700
@@ -69,7 +69,7 @@
},
module: {
rules: [
- { enforce: 'pre', test: /\.js$/, loader: 'source-map-loader', exclude: [nodeModules] },
+ { enforce: 'pre', test: /\.js$/, loader: 'source-map-loader'},
{ test: /\.json$/, loader: 'json-loader' },
{ test: /\.html$/, loader: 'raw-loader' },
@IgorMinar
IgorMinar / _purify.md
Last active March 30, 2017 11:55
purify.js with cli and webpack plugin - simple and super-hackish Uglify pre-optimizer

This is a super-hacky tool that processes JavaScript bundless before they are fed to Uglify.

Purify adds @__PURE__ annotation in front of all IIFE's that represent ES classes downleveled by TypeScript.

This annotation then enables Uglify 2.8+ to safely recognize if the class is not used and remove it.

You can use it webpack-plugin or cli.

Angular developers will need the bundle to be also processed by alxhub/ngo before the full effect can be seen.