mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
fix: throw if global css file is not found in webpack context (#5186)
This commit is contained in:
@ -88,7 +88,12 @@ export function getCssFileName(): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function loadAppCss(): void {
|
export function loadAppCss(): void {
|
||||||
events.notify(<LoadAppCSSEventData>{ eventName: "loadAppCss", object: app, cssFile: getCssFileName() });
|
try {
|
||||||
|
events.notify(<LoadAppCSSEventData>{ eventName: "loadAppCss", object: app, cssFile: getCssFileName() });
|
||||||
|
} catch (e) {
|
||||||
|
throw new Error(`The file ${getCssFileName()} couldn't be loaded! ` +
|
||||||
|
`You may need to register it inside ./app/vendor.ts.`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addCss(cssText: string): void {
|
export function addCss(cssText: string): void {
|
||||||
|
Reference in New Issue
Block a user