mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +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() {
|
||||
if (!env.nativescriptLibPath) {
|
||||
warnOnce(
|
||||
'getCLILib',
|
||||
`
|
||||
Cannot find NativeScript CLI path. Make sure --env.nativescriptLibPath is passed
|
||||
`
|
||||
);
|
||||
if (typeof env.nativescriptLibPath !== 'boolean') {
|
||||
warnOnce(
|
||||
'getCLILib',
|
||||
`
|
||||
Cannot find NativeScript CLI path. Make sure --env.nativescriptLibPath is passed
|
||||
`
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return require(env.nativescriptLibPath);
|
||||
if (typeof env.nativescriptLibPath === 'boolean') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return require(env.nativescriptLibPath as string);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user