swico 0.6.0-beta30 → 0.6.0-beta32
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 +1 -1
- package/src/utils/tools.js +3 -1
package/package.json
CHANGED
package/src/utils/config.js
CHANGED
|
@@ -296,7 +296,7 @@ var initTemplateConfig = function (routerConfig, templateType, env) {
|
|
|
296
296
|
})];
|
|
297
297
|
case 1:
|
|
298
298
|
_a.sent();
|
|
299
|
-
return [4, (0, tools_1.copyDirFiles)(path_1.default.resolve(__dirname, "../template/".concat(templateType)), path_1.default.resolve(projectPath, './src/.swico'), function (fileName) { return ['hooks.js'].includes(fileName); })];
|
|
299
|
+
return [4, (0, tools_1.copyDirFiles)(path_1.default.resolve(__dirname, "../template/".concat(templateType)), path_1.default.resolve(projectPath, './src/.swico'), function (fileName) { return ['hooks.js', 'loading.js'].includes(fileName); })];
|
|
300
300
|
case 2:
|
|
301
301
|
_a.sent();
|
|
302
302
|
return [4, formatRouterConfig(routerConfig, templateType, env)];
|
package/src/utils/tools.js
CHANGED
|
@@ -174,9 +174,11 @@ var initIndexFile = function () { return __awaiter(void 0, void 0, void 0, funct
|
|
|
174
174
|
fileText = fs_extra_1.default.readFileSync(path_1.default.resolve(__dirname, '../index.js'), 'utf8');
|
|
175
175
|
targetPath = path_1.default.resolve(__dirname, '../index.js');
|
|
176
176
|
formatHooksPath = path_1.default
|
|
177
|
-
.resolve(process.cwd(), './src/.swico/hooks
|
|
177
|
+
.resolve(process.cwd(), './src/.swico/hooks')
|
|
178
178
|
.replaceAll('\\', '/');
|
|
179
|
+
console.log('formatHooksPath', formatHooksPath);
|
|
179
180
|
fileText = fileText.replaceAll("require(\"".concat(formatHooksPath, "\");"), 'require("./template/react/hooks");');
|
|
181
|
+
console.log('fileText', fileText);
|
|
180
182
|
return [4, (0, exports.writeFile)(targetPath, fileText)];
|
|
181
183
|
case 1:
|
|
182
184
|
_a.sent();
|