swico 2.2.0-beta.1 → 2.2.0
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": "2.2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Simple, efficient, and practical front-end framework",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@eslint/js": "9.24.0",
|
|
63
|
-
"@rspack/core": "1.
|
|
63
|
+
"@rspack/core": "1.5.6",
|
|
64
64
|
"@types/node": "22.13.10",
|
|
65
65
|
"@types/react": "19.1.0",
|
|
66
66
|
"@types/react-dom": "19.1.0",
|
|
@@ -74,7 +74,7 @@ function default_1(options) {
|
|
|
74
74
|
progress: false,
|
|
75
75
|
overlay: false
|
|
76
76
|
},
|
|
77
|
-
headers: (_c = (_b = customConfig === null || customConfig === void 0 ? void 0 : customConfig.dev) === null || _b === void 0 ? void 0 : _b.
|
|
77
|
+
headers: (_c = (_b = customConfig === null || customConfig === void 0 ? void 0 : customConfig.dev) === null || _b === void 0 ? void 0 : _b.responseHeaders) !== null && _c !== void 0 ? _c : config_1.initConfig.responseHeaders,
|
|
78
78
|
proxy: (_e = (_d = customConfig === null || customConfig === void 0 ? void 0 : customConfig.dev) === null || _d === void 0 ? void 0 : _d.proxy) !== null && _e !== void 0 ? _e : config_1.initConfig.proxy,
|
|
79
79
|
compress: true,
|
|
80
80
|
hot: true,
|
package/src/utils/config.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface GlobalSwicoConfigType {
|
|
|
22
22
|
alias?: Record<string, any>;
|
|
23
23
|
proxy?: Array<Record<string, any>>;
|
|
24
24
|
https?: boolean;
|
|
25
|
-
|
|
25
|
+
responseHeaders?: Record<string, any>;
|
|
26
26
|
copy?: Array<string | {
|
|
27
27
|
from: string;
|
|
28
28
|
to: string;
|
|
@@ -39,7 +39,7 @@ export interface GlobalData {
|
|
|
39
39
|
env?: 'dev' | 'prod';
|
|
40
40
|
customConfig: {
|
|
41
41
|
base: Pick<GlobalSwicoConfigType, 'plugins' | 'publicPath' | 'alias' | 'define' | 'devtool' | 'externals' | 'router' | 'template'>;
|
|
42
|
-
dev: Pick<GlobalSwicoConfigType, 'plugins' | 'proxy' | 'https' | 'devtool' | 'router' | '
|
|
42
|
+
dev: Pick<GlobalSwicoConfigType, 'plugins' | 'proxy' | 'https' | 'devtool' | 'router' | 'responseHeaders'>;
|
|
43
43
|
prod: Pick<GlobalSwicoConfigType, 'plugins' | 'console' | 'copy' | 'devtool' | 'router'>;
|
|
44
44
|
};
|
|
45
45
|
}
|
package/src/utils/config.js
CHANGED
|
@@ -82,7 +82,14 @@ const getProjectConfig = (env) => __awaiter(void 0, void 0, void 0, function* ()
|
|
|
82
82
|
configFileName = 'swico.ts';
|
|
83
83
|
break;
|
|
84
84
|
case 'dev':
|
|
85
|
-
supportedFieldList = [
|
|
85
|
+
supportedFieldList = [
|
|
86
|
+
'plugins',
|
|
87
|
+
'proxy',
|
|
88
|
+
'https',
|
|
89
|
+
'devtool',
|
|
90
|
+
'router',
|
|
91
|
+
'responseHeaders'
|
|
92
|
+
];
|
|
86
93
|
configFileName = 'swico.dev.ts';
|
|
87
94
|
break;
|
|
88
95
|
case 'prod':
|
|
@@ -269,7 +276,7 @@ exports.initConfig = {
|
|
|
269
276
|
plugins: [],
|
|
270
277
|
publicPath: '/',
|
|
271
278
|
proxy: undefined,
|
|
272
|
-
|
|
279
|
+
responseHeaders: undefined,
|
|
273
280
|
copy: [],
|
|
274
281
|
router: {
|
|
275
282
|
base: '/',
|