mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
feat(webpack): allow disabling nativescriptLibPath warning with a boolean
This commit is contained in:

committed by
Nathan Walker

parent
0556cf9b20
commit
fefac9f554
@ -3,16 +3,22 @@ import { env } from '../index';
|
|||||||
|
|
||||||
function getCLILib() {
|
function getCLILib() {
|
||||||
if (!env.nativescriptLibPath) {
|
if (!env.nativescriptLibPath) {
|
||||||
|
if (typeof env.nativescriptLibPath !== 'boolean') {
|
||||||
warnOnce(
|
warnOnce(
|
||||||
'getCLILib',
|
'getCLILib',
|
||||||
`
|
`
|
||||||
Cannot find NativeScript CLI path. Make sure --env.nativescriptLibPath is passed
|
Cannot find NativeScript CLI path. Make sure --env.nativescriptLibPath is passed
|
||||||
`
|
`
|
||||||
);
|
);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return require(env.nativescriptLibPath);
|
if (typeof env.nativescriptLibPath === 'boolean') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return require(env.nativescriptLibPath as string);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,7 +28,7 @@ export interface IWebpackEnv {
|
|||||||
appResourcesPath?: string;
|
appResourcesPath?: string;
|
||||||
appComponents?: string[];
|
appComponents?: string[];
|
||||||
|
|
||||||
nativescriptLibPath?: string;
|
nativescriptLibPath?: string | boolean;
|
||||||
|
|
||||||
android?: boolean;
|
android?: boolean;
|
||||||
ios?: boolean;
|
ios?: boolean;
|
||||||
|
Reference in New Issue
Block a user