swico 3.1.0-beta.6 → 3.1.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swico",
3
- "version": "3.1.0-beta.6",
3
+ "version": "3.1.0-beta.8",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -122,19 +122,25 @@ const getProjectConfig = (env) => __awaiter(void 0, void 0, void 0, function* ()
122
122
  supportedFieldList = ['plugins', 'console', 'copy', 'devtool', 'router'];
123
123
  configFileName = 'swico.prod.ts';
124
124
  }
125
- const toastTitle = `Swico config file => ${chalk_1.default.hex(utils_1.colorConfig.theme)(configFileName)}`;
125
+ const toastTitle = `Swico config file error => ${chalk_1.default.hex(utils_1.colorConfig.theme)(configFileName)}`;
126
126
  const unSupportedField = configFields.find((field) => !supportedFieldList.includes(field));
127
127
  if (configFields.length > 0 && unSupportedField) {
128
- const msgText = `The Swico configuration file '${chalk_1.default.blue(configFileName)}' does not support the field '${chalk_1.default.red(unSupportedField)}' `;
128
+ const msgText = `The Swico configuration file '${chalk_1.default.blue(configFileName)}' does not support the field '${chalk_1.default.blue(unSupportedField)}' `;
129
129
  utils_1.toast.error(msgText);
130
130
  process.exit(1);
131
131
  }
132
+ if (key === 'base' &&
133
+ configObj['template'] === 'vue' &&
134
+ configFields.includes('reactCompiler')) {
135
+ utils_1.toast.error(`'${chalk_1.default.blue('vue')}' template does not support the field '${chalk_1.default.blue('reactCompiler')}'`, { title: toastTitle });
136
+ process.exit(1);
137
+ }
132
138
  if (key === 'base' && !['vue', 'react'].includes(configObj['template'])) {
133
- utils_1.toast.error(`The field '${chalk_1.default.blue('template')}' does not support the value '${chalk_1.default.red(configObj['template'])}',the value should be 'vue' or 'react' `, { title: toastTitle });
139
+ utils_1.toast.error(`The field '${chalk_1.default.blue('template')}' does not support the value '${chalk_1.default.blue(configObj['template'])}',the value should be 'vue' or 'react' `, { title: toastTitle });
134
140
  process.exit(1);
135
141
  }
136
142
  if (!['hash', 'browser'].includes((_b = (_a = configObj['router']) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : exports.initConfig.router.type)) {
137
- utils_1.toast.error(`The field '${chalk_1.default.blue('router.type')}' does not support the value '${chalk_1.default.red(configObj['router'].type)}',the value should be 'browser' or 'hash' `, { title: toastTitle });
143
+ utils_1.toast.error(`The field '${chalk_1.default.blue('router.type')}' does not support the value '${chalk_1.default.blue(configObj['router'].type)}',the value should be 'browser' or 'hash' `, { title: toastTitle });
138
144
  process.exit(1);
139
145
  }
140
146
  customConfig[key] = (yield Promise.resolve(`${curConfigFilePath}`).then(s => __importStar(require(s)))).default;