chore(migrate): apps/* to webpack5 (#9606)

This commit is contained in:
Igor Randjelovic
2021-12-21 18:47:33 +01:00
committed by GitHub
parent 04c0f8783d
commit a88cacab89
62 changed files with 643 additions and 404 deletions

View File

@@ -175,7 +175,7 @@ export class DOMNode {
dispose() {
unregisterNode(this);
this.viewRef.clear();
// this.viewRef.clear();
}
public toObject() {

View File

@@ -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 };
}
}
}

View File

@@ -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();

View File

@@ -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 {