swico 3.1.0-beta.5 → 3.1.0-beta.6
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.
|
|
3
|
+
"version": "3.1.0-beta.6",
|
|
4
4
|
"description": "Simple, efficient, and practical front-end framework",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@rsbuild/plugin-less": "~2.0.1",
|
|
52
52
|
"@rsbuild/plugin-react": "~2.1.0",
|
|
53
53
|
"@rsbuild/plugin-sass": "~2.0.1",
|
|
54
|
-
"@rsbuild/plugin-type-check": "~1.
|
|
54
|
+
"@rsbuild/plugin-type-check": "~1.6.0",
|
|
55
55
|
"@rsbuild/plugin-vue": "~2.0.1",
|
|
56
56
|
"@rsdoctor/rspack-plugin": "~1.6.3",
|
|
57
57
|
"chalk": "4.1.2",
|
package/src/command/start.js
CHANGED
|
@@ -23,8 +23,7 @@ const package_json_1 = __importDefault(require("../../package.json"));
|
|
|
23
23
|
const chalk_1 = __importDefault(require("chalk"));
|
|
24
24
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
25
25
|
const core_1 = require("@rsbuild/core");
|
|
26
|
-
const { SWICO_DEV_RESTART
|
|
27
|
-
let currentRouterBase = '/';
|
|
26
|
+
const { SWICO_DEV_RESTART } = process.env;
|
|
28
27
|
const handleWatch = (projectPath, devServer, env) => {
|
|
29
28
|
const envPath = env === 'dev' ? '/.dev/' : '/.prod/';
|
|
30
29
|
const configFilesWatcher = chokidar_1.default
|
|
@@ -75,7 +74,7 @@ const handleWatch = (projectPath, devServer, env) => {
|
|
|
75
74
|
}));
|
|
76
75
|
};
|
|
77
76
|
const restartServer = () => {
|
|
78
|
-
const result = cross_spawn_1.default.sync('cross-env', ['SWICO_DEV_RESTART=true',
|
|
77
|
+
const result = cross_spawn_1.default.sync('cross-env', ['SWICO_DEV_RESTART=true', 'swico', 'start'], {
|
|
79
78
|
stdio: 'inherit'
|
|
80
79
|
});
|
|
81
80
|
if (result.error) {
|
|
@@ -134,10 +133,7 @@ function start() {
|
|
|
134
133
|
const { server } = yield rsbuild.startDevServer();
|
|
135
134
|
createCompileListener(rsbuild);
|
|
136
135
|
handleWatch(projectPath, server, env);
|
|
137
|
-
|
|
138
|
-
(SWICO_DEV_RESTART === 'true' && newRouterBase !== SWICO_DEV_ROUTER_BASE)) {
|
|
139
|
-
utils_1.toast.info(`Project is running at:${chalk_1.default.hex('#29abe0')(`${customConfig.dev.https ? 'https' : 'http'}://localhost:${rsbuild.context.devServer.port}${newRouterBase}`)}`);
|
|
140
|
-
}
|
|
136
|
+
utils_1.toast.info(`Project is running at:${chalk_1.default.hex('#29abe0')(`${customConfig.dev.https ? 'https' : 'http'}://localhost:${rsbuild.context.devServer.port}${newRouterBase}`)}`);
|
|
141
137
|
const proxyConfig = startConfig.server.proxy;
|
|
142
138
|
if (proxyConfig &&
|
|
143
139
|
(Array.isArray(proxyConfig)
|
|
@@ -145,7 +141,6 @@ function start() {
|
|
|
145
141
|
: Object.keys(proxyConfig).length > 0)) {
|
|
146
142
|
utils_1.toast.info('Proxy service is enabled');
|
|
147
143
|
}
|
|
148
|
-
currentRouterBase = newRouterBase;
|
|
149
144
|
}
|
|
150
145
|
catch (e) {
|
|
151
146
|
const strErr = e.toString();
|
|
@@ -99,6 +99,9 @@ function default_1(options) {
|
|
|
99
99
|
logger: {
|
|
100
100
|
log: () => { },
|
|
101
101
|
error: (message) => {
|
|
102
|
+
if (templateType === 'vue' && message.includes('Extensions changed')) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
102
105
|
utils_1.toast.error(message, { title: 'TypeScript errors' });
|
|
103
106
|
}
|
|
104
107
|
},
|