mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
refactor: improve tree shaking abilities
Internal refactor completed in order to improve tree shaking and dead code removal. The public API, with an exception to ion-slides, has stayed the same. However, internally many changes were required so bundlers could better exclude modules which should not be bundled. Ultimately most changes resorted to removing references to `window` or `document`, or a module that referenced one of those. BREAKING CHANGES ion-slides was refactored to remove the external dependencies, and rewritten in TypeScript/ES6 modules to again improve tree shaking abilities.
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
import { swipeShouldReset } from '../util/util';
|
||||
import { DomController } from '../platform/dom-controller';
|
||||
import { GestureController, GesturePriority, GESTURE_GO_BACK_SWIPE } from '../gestures/gesture-controller';
|
||||
import { NavControllerBase } from './nav-controller-base';
|
||||
import { Platform } from '../platform/platform';
|
||||
import { SlideData } from '../gestures/slide-gesture';
|
||||
import { SlideEdgeGesture } from '../gestures/slide-edge-gesture';
|
||||
import { DomController } from '../util/dom-controller';
|
||||
|
||||
/**
|
||||
* @private
|
||||
@ -11,11 +12,12 @@ import { DomController } from '../util/dom-controller';
|
||||
export class SwipeBackGesture extends SlideEdgeGesture {
|
||||
|
||||
constructor(
|
||||
plt: Platform,
|
||||
private _nav: NavControllerBase,
|
||||
gestureCtlr: GestureController,
|
||||
domCtrl: DomController,
|
||||
) {
|
||||
super(document.body, {
|
||||
super(plt, plt.doc().body, {
|
||||
direction: 'x',
|
||||
edge: 'left',
|
||||
maxEdgeStart: 75,
|
||||
|
||||
Reference in New Issue
Block a user