swico 2.1.0-beta.4 → 2.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": "2.1.0-beta.
|
|
3
|
+
"version": "2.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",
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@rspack/dev-server": "1.1.1",
|
|
33
33
|
"@vue/compiler-sfc": "3.5.13",
|
|
34
|
-
"autoprefixer": "10.3.7",
|
|
35
34
|
"chalk": "4.1.2",
|
|
36
35
|
"chokidar": "3.6.0",
|
|
37
36
|
"commander": "12.0.0",
|
|
@@ -48,50 +48,13 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
|
|
|
48
48
|
oneOf?: undefined;
|
|
49
49
|
} | {
|
|
50
50
|
oneOf: ({
|
|
51
|
-
test: RegExp;
|
|
52
|
-
type: string;
|
|
53
|
-
use: {
|
|
54
|
-
loader: string;
|
|
55
|
-
options: {
|
|
56
|
-
postcssOptions: {
|
|
57
|
-
plugins: string[][];
|
|
58
|
-
config: string;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
}[];
|
|
62
|
-
generator?: undefined;
|
|
63
|
-
loader?: undefined;
|
|
64
|
-
} | {
|
|
65
51
|
test: RegExp;
|
|
66
52
|
type: string;
|
|
67
53
|
use: (string | {
|
|
68
|
-
loader: string;
|
|
69
|
-
options: {
|
|
70
|
-
postcssOptions: {
|
|
71
|
-
plugins: string[][];
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
})[];
|
|
75
|
-
generator?: undefined;
|
|
76
|
-
loader?: undefined;
|
|
77
|
-
} | {
|
|
78
|
-
test: RegExp;
|
|
79
|
-
type: string;
|
|
80
|
-
use: ({
|
|
81
|
-
loader: string;
|
|
82
|
-
options: {
|
|
83
|
-
postcssOptions: {
|
|
84
|
-
plugins: string[][];
|
|
85
|
-
};
|
|
86
|
-
api?: undefined;
|
|
87
|
-
implementation?: undefined;
|
|
88
|
-
};
|
|
89
|
-
} | {
|
|
90
54
|
loader: string;
|
|
91
55
|
options: {
|
|
92
56
|
api: string;
|
|
93
57
|
implementation: string;
|
|
94
|
-
postcssOptions?: undefined;
|
|
95
58
|
};
|
|
96
59
|
})[];
|
|
97
60
|
generator?: undefined;
|
|
@@ -21,7 +21,7 @@ const sassLoader = require.resolve('sass-loader');
|
|
|
21
21
|
const postcssLoader = require.resolve('postcss-loader');
|
|
22
22
|
function default_1(_a) {
|
|
23
23
|
return __awaiter(this, arguments, void 0, function* ({ projectPath, entryPath, env, customConfig }) {
|
|
24
|
-
var _b, _c, _d, _e, _f, _g
|
|
24
|
+
var _b, _c, _d, _e, _f, _g;
|
|
25
25
|
const customBaseConfig = customConfig.base;
|
|
26
26
|
const getCustomAliasConfig = () => {
|
|
27
27
|
const { alias } = customBaseConfig || {};
|
|
@@ -35,9 +35,9 @@ function default_1(_a) {
|
|
|
35
35
|
};
|
|
36
36
|
const publicPath = (_b = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.publicPath) !== null && _b !== void 0 ? _b : config_1.initConfig.publicPath;
|
|
37
37
|
const routerBase = (_d = (_c = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.router) === null || _c === void 0 ? void 0 : _c.base) !== null && _d !== void 0 ? _d : config_1.initConfig.router.base;
|
|
38
|
-
const cssMode =
|
|
38
|
+
const cssMode = 'css/auto';
|
|
39
39
|
const basicPlugins = [];
|
|
40
|
-
const defineConfigData = (
|
|
40
|
+
const defineConfigData = (_f = (_e = customConfig === null || customConfig === void 0 ? void 0 : customConfig.base) === null || _e === void 0 ? void 0 : _e.define) !== null && _f !== void 0 ? _f : {};
|
|
41
41
|
const formatObj = yield (0, config_1.getFormatDefineVars)(defineConfigData);
|
|
42
42
|
if (Object.keys(formatObj).length !== 0) {
|
|
43
43
|
basicPlugins.push(new core_1.rspack.DefinePlugin(formatObj));
|
|
@@ -97,45 +97,18 @@ function default_1(_a) {
|
|
|
97
97
|
{
|
|
98
98
|
test: /\.css$/,
|
|
99
99
|
type: cssMode,
|
|
100
|
-
use: [
|
|
101
|
-
{
|
|
102
|
-
loader: postcssLoader,
|
|
103
|
-
options: {
|
|
104
|
-
postcssOptions: {
|
|
105
|
-
plugins: [['autoprefixer']],
|
|
106
|
-
config: path_1.default.join(projectPath, '/postcss.config.mjs')
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
]
|
|
100
|
+
use: [postcssLoader]
|
|
111
101
|
},
|
|
112
102
|
{
|
|
113
103
|
test: /\.less$/,
|
|
114
104
|
type: cssMode,
|
|
115
|
-
use: [
|
|
116
|
-
{
|
|
117
|
-
loader: postcssLoader,
|
|
118
|
-
options: {
|
|
119
|
-
postcssOptions: {
|
|
120
|
-
plugins: [['autoprefixer']]
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
lessLoader
|
|
125
|
-
]
|
|
105
|
+
use: [postcssLoader, lessLoader]
|
|
126
106
|
},
|
|
127
107
|
{
|
|
128
108
|
test: /\.scss$/,
|
|
129
109
|
type: cssMode,
|
|
130
110
|
use: [
|
|
131
|
-
|
|
132
|
-
loader: postcssLoader,
|
|
133
|
-
options: {
|
|
134
|
-
postcssOptions: {
|
|
135
|
-
plugins: [['autoprefixer']]
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
},
|
|
111
|
+
postcssLoader,
|
|
139
112
|
{
|
|
140
113
|
loader: sassLoader,
|
|
141
114
|
options: {
|
|
@@ -188,7 +161,7 @@ function default_1(_a) {
|
|
|
188
161
|
},
|
|
189
162
|
hash: true
|
|
190
163
|
}),
|
|
191
|
-
...((
|
|
164
|
+
...((_g = customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) !== null && _g !== void 0 ? _g : config_1.initConfig.plugins)
|
|
192
165
|
]
|
|
193
166
|
};
|
|
194
167
|
});
|