mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(webpack): angular configuration schema validation compliance
This commit is contained in:
@@ -24,16 +24,19 @@ const parseWorkspaceConfig = function(platform, envConfigs, projectName, debug)
|
|||||||
|
|
||||||
// default project configurations
|
// default project configurations
|
||||||
for (const envConfig of envConfigs) {
|
for (const envConfig of envConfigs) {
|
||||||
if (projectSettings.configurations && projectSettings.configurations[envConfig]) {
|
if (projectSettings.architect.default && projectSettings.architect.default.configurations) {
|
||||||
if (projectSettings.configurations[envConfig].fileReplacements) {
|
const defaultConfigurations = projectSettings.architect.default.configurations;
|
||||||
for (const fileReplace of projectSettings.configurations[envConfig].fileReplacements) {
|
if (defaultConfigurations && defaultConfigurations[envConfig]) {
|
||||||
if (debug) {
|
if (defaultConfigurations[envConfig].fileReplacements) {
|
||||||
console.log('project fileReplacement:', fileReplace);
|
for (const fileReplace of defaultConfigurations[envConfig].fileReplacements) {
|
||||||
}
|
if (debug) {
|
||||||
if (fileReplace.replace.indexOf('.ts') > -1) {
|
console.log('project fileReplacement:', fileReplace);
|
||||||
fileReplacements[resolve(__dirname, `${rootPath}${fileReplace.replace}`)] = resolve(__dirname, `${rootPath}${fileReplace.with}`);
|
}
|
||||||
} else {
|
if (fileReplace.replace.indexOf('.ts') > -1) {
|
||||||
copyReplacements.push({ from: resolve(__dirname, `${rootPath}${fileReplace.with}`), to: resolve(__dirname, `${rootPath}${fileReplace.replace}`), force: true });
|
fileReplacements[resolve(__dirname, `${rootPath}${fileReplace.replace}`)] = resolve(__dirname, `${rootPath}${fileReplace.with}`);
|
||||||
|
} else {
|
||||||
|
copyReplacements.push({ from: resolve(__dirname, `${rootPath}${fileReplace.with}`), to: resolve(__dirname, `${rootPath}${fileReplace.replace}`), force: true });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nativescript/webpack",
|
"name": "@nativescript/webpack",
|
||||||
"version": "3.0.6",
|
"version": "3.0.7",
|
||||||
"main": "index",
|
"main": "index",
|
||||||
"description": "Webpack plugin for NativeScript",
|
"description": "Webpack plugin for NativeScript",
|
||||||
"homepage": "https://nativescript.org",
|
"homepage": "https://nativescript.org",
|
||||||
|
|||||||
Reference in New Issue
Block a user