mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(core): nativescript.config and webpack updates (#8801)
This commit is contained in:
@@ -44,6 +44,13 @@ const isVue = ({ projectDir, packageJson } = {}) => {
|
||||
.some(dependency => dependency === "nativescript-vue");
|
||||
};
|
||||
|
||||
const isReact = ({ projectDir, packageJson } = {}) => {
|
||||
packageJson = packageJson || getPackageJson(projectDir);
|
||||
|
||||
return packageJson.dependencies && Object.keys(packageJson.dependencies)
|
||||
.some(dependency => dependency === "react-nativescript");
|
||||
};
|
||||
|
||||
const getPackageJson = projectDir => {
|
||||
const packageJsonPath = getPackageJsonPath(projectDir);
|
||||
const result = readJsonFile(packageJsonPath);
|
||||
@@ -137,6 +144,7 @@ module.exports = {
|
||||
isPlugin,
|
||||
getAngularVersion,
|
||||
isVue,
|
||||
isReact,
|
||||
isTypeScript,
|
||||
writePackageJson,
|
||||
convertSlashesInPath,
|
||||
|
||||
Reference in New Issue
Block a user