swico 2.5.0-beta.2 → 2.5.0-beta.3
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 +1 -1
- package/src/utils/config.js +2 -2
package/package.json
CHANGED
package/src/utils/config.js
CHANGED
|
@@ -235,9 +235,9 @@ const initTemplateConfig = (routerConfig, templateType, env) => {
|
|
|
235
235
|
return new Promise((resolve, reject) => __awaiter(void 0, void 0, void 0, function* () {
|
|
236
236
|
const copyTargetPath = path_1.default.resolve(projectPath, `./.swico${envPath}`);
|
|
237
237
|
yield (0, tools_1.copyDirFiles)(path_1.default.resolve(__dirname, `../project-path/.swico-${templateType}/$env`), copyTargetPath, (fileName) => !fileName.endsWith('.d.ts') && !['hooks.js'].includes(fileName));
|
|
238
|
-
yield (0, tools_1.copyDirFiles)(path_1.default.resolve(__dirname, `../project-path/.swico-${templateType}
|
|
238
|
+
yield (0, tools_1.copyDirFiles)(path_1.default.resolve(__dirname, `../project-path/.swico-${templateType}`), path_1.default.resolve(projectPath, './.swico'), (fileName) => ['hooks.js', 'Link.js', 'loading.js'].includes(fileName));
|
|
239
239
|
const entryFilePath = path_1.default.resolve(projectPath, './.swico/index.js');
|
|
240
|
-
yield fs_extra_1.default.copyFile(path_1.default.resolve(__dirname, `../index.${templateType}`), entryFilePath);
|
|
240
|
+
yield fs_extra_1.default.copyFile(path_1.default.resolve(__dirname, `../index.${templateType}.js`), entryFilePath);
|
|
241
241
|
yield formatRouterConfig(routerConfig, templateType, env);
|
|
242
242
|
const hooksFilePath = path_1.default.resolve(projectPath, './.swico/hooks.js');
|
|
243
243
|
let replaceHooksText = yield fs_extra_1.default.readFile(hooksFilePath, 'utf8');
|