mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
fix: load globals first
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { merge } from 'webpack-merge';
|
||||
import { getValue } from './config';
|
||||
import { getAllDependencies, getDependencyPath } from './dependencies';
|
||||
import { determineProjectFlavor } from './flavor';
|
||||
@ -16,6 +17,7 @@ import {
|
||||
// that show all the utils inline
|
||||
// rather than imports to types
|
||||
export default {
|
||||
merge,
|
||||
config: {
|
||||
getValue,
|
||||
},
|
||||
@ -27,9 +29,9 @@ export default {
|
||||
determineProjectFlavor,
|
||||
},
|
||||
log: {
|
||||
error,
|
||||
info,
|
||||
warn,
|
||||
error,
|
||||
},
|
||||
project: {
|
||||
getProjectRootPath,
|
||||
|
@ -11,7 +11,7 @@ function cleanup(data: any[]) {
|
||||
}
|
||||
|
||||
export function error(...data: any): Error {
|
||||
console.error(`[@nativescript/webpack]`, ...cleanup(data));
|
||||
console.error(`[@nativescript/webpack] Error: \n`, ...cleanup(data));
|
||||
|
||||
// we return the error - the caller can throw or ignore
|
||||
if (typeof data[0] === 'string') {
|
||||
@ -22,11 +22,11 @@ export function error(...data: any): Error {
|
||||
}
|
||||
|
||||
export function warn(...data: any): void {
|
||||
console.warn(`[@nativescript/webpack]`, ...cleanup(data));
|
||||
console.warn(`[@nativescript/webpack] Warn: \n`, ...cleanup(data));
|
||||
}
|
||||
|
||||
export function info(...data: any): void {
|
||||
console.info(`[@nativescript/webpack]`, ...cleanup(data));
|
||||
console.info(`[@nativescript/webpack] Info: \n`, ...cleanup(data));
|
||||
}
|
||||
|
||||
// todo: refine
|
||||
|
Reference in New Issue
Block a user