mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore(migrate): apps/* to webpack5 (#9606)
This commit is contained in:
@@ -175,7 +175,7 @@ export class DOMNode {
|
||||
|
||||
dispose() {
|
||||
unregisterNode(this);
|
||||
this.viewRef.clear();
|
||||
// this.viewRef.clear();
|
||||
}
|
||||
|
||||
public toObject() {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ScopeError, SourceError, Source } from '../../utils/debug';
|
||||
import * as xml from '../../xml';
|
||||
import { isString, isObject } from '../../utils/types';
|
||||
import { getComponentModule } from './component-builder';
|
||||
import { ComponentModule } from './component-builder';
|
||||
import type { ComponentModule } from './component-builder';
|
||||
import { Device } from '../../platform';
|
||||
import { profile } from '../../profiling';
|
||||
import { android, ios, loadCustomComponent, defaultNameSpaceMatcher, getExports, Builder } from './index';
|
||||
@@ -296,7 +296,7 @@ export namespace xml2ui {
|
||||
return this._value;
|
||||
}
|
||||
|
||||
constructor(private parent: XmlStateConsumer, private templateProperty: TemplateProperty) { }
|
||||
constructor(private parent: XmlStateConsumer, private templateProperty: TemplateProperty) {}
|
||||
|
||||
public parse(args: xml.ParserEvent): XmlStateConsumer {
|
||||
if (args.eventType === xml.ParserEventType.StartElement && args.elementName === 'template') {
|
||||
@@ -331,7 +331,7 @@ export namespace xml2ui {
|
||||
export const enum State {
|
||||
EXPECTING_START,
|
||||
PARSING,
|
||||
FINISHED
|
||||
FINISHED,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -514,7 +514,7 @@ export namespace xml2ui {
|
||||
parent: ComponentModule;
|
||||
name: string;
|
||||
items?: Array<any>;
|
||||
parser?: { value: any; };
|
||||
parser?: { value: any };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,9 +164,9 @@ export class Binding {
|
||||
|
||||
this.propertyChangeListeners.clear();
|
||||
|
||||
if (this.source) {
|
||||
this.source.clear();
|
||||
}
|
||||
// if (this.source) {
|
||||
// this.source.clear();
|
||||
// }
|
||||
|
||||
if (this.sourceOptions) {
|
||||
this.sourceOptions.instance.clear();
|
||||
|
||||
@@ -92,13 +92,19 @@ class CSSSource {
|
||||
if (typeof cssOrAst === 'string') {
|
||||
// raw-loader
|
||||
return CSSSource.fromSource(cssOrAst, keyframes, fileName);
|
||||
} else if (typeof cssOrAst === 'object' && cssOrAst.type === 'stylesheet' && cssOrAst.stylesheet && cssOrAst.stylesheet.rules) {
|
||||
// css-loader
|
||||
return CSSSource.fromAST(cssOrAst, keyframes, fileName);
|
||||
} else {
|
||||
// css2json-loader
|
||||
return CSSSource.fromSource(cssOrAst.toString(), keyframes, fileName);
|
||||
} else if (typeof cssOrAst === 'object') {
|
||||
if (cssOrAst.default) {
|
||||
cssOrAst = cssOrAst.default;
|
||||
}
|
||||
|
||||
if (cssOrAst.type === 'stylesheet' && cssOrAst.stylesheet && cssOrAst.stylesheet.rules) {
|
||||
// css-loader
|
||||
return CSSSource.fromAST(cssOrAst, keyframes, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
// css2json-loader
|
||||
return CSSSource.fromSource(cssOrAst.toString(), keyframes, fileName);
|
||||
}
|
||||
|
||||
public static fromURI(uri: string, keyframes: KeyframesMap): CSSSource {
|
||||
|
||||
Reference in New Issue
Block a user