swico 2.0.0-beta.26 → 2.0.0-beta.27
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/config/rspack.base.vue.d.ts +46 -56
- package/src/config/rspack.base.vue.js +74 -145
package/package.json
CHANGED
|
@@ -21,7 +21,8 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
|
|
|
21
21
|
experimentalInlineMatchResource: boolean;
|
|
22
22
|
};
|
|
23
23
|
use?: undefined;
|
|
24
|
-
|
|
24
|
+
type?: undefined;
|
|
25
|
+
generator?: undefined;
|
|
25
26
|
} | {
|
|
26
27
|
test: RegExp;
|
|
27
28
|
exclude: RegExp;
|
|
@@ -41,70 +42,59 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
|
|
|
41
42
|
}[];
|
|
42
43
|
loader?: undefined;
|
|
43
44
|
options?: undefined;
|
|
44
|
-
|
|
45
|
+
type?: undefined;
|
|
46
|
+
generator?: undefined;
|
|
45
47
|
} | {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
namedExports: boolean;
|
|
56
|
-
};
|
|
57
|
-
postcssOptions?: undefined;
|
|
58
|
-
};
|
|
59
|
-
} | {
|
|
60
|
-
loader: string;
|
|
61
|
-
options: {
|
|
62
|
-
postcssOptions: {
|
|
63
|
-
plugins: string[][];
|
|
64
|
-
};
|
|
65
|
-
modules?: undefined;
|
|
66
|
-
};
|
|
67
|
-
})[];
|
|
68
|
-
} | {
|
|
69
|
-
use: (string | {
|
|
70
|
-
loader: string;
|
|
71
|
-
options: {
|
|
72
|
-
postcssOptions: {
|
|
73
|
-
plugins: string[][];
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
})[];
|
|
77
|
-
resourceQuery?: undefined;
|
|
78
|
-
})[];
|
|
79
|
-
type?: undefined;
|
|
80
|
-
generator?: undefined;
|
|
81
|
-
loader?: undefined;
|
|
82
|
-
} | {
|
|
83
|
-
test: RegExp;
|
|
84
|
-
type: string;
|
|
85
|
-
generator: {
|
|
86
|
-
filename: string;
|
|
48
|
+
test: RegExp;
|
|
49
|
+
use: (string | {
|
|
50
|
+
loader: string;
|
|
51
|
+
options: {
|
|
52
|
+
modules: {
|
|
53
|
+
localIdentName: string;
|
|
54
|
+
namedExports: boolean;
|
|
55
|
+
};
|
|
56
|
+
postcssOptions?: undefined;
|
|
87
57
|
};
|
|
88
|
-
oneOf?: undefined;
|
|
89
|
-
loader?: undefined;
|
|
90
58
|
} | {
|
|
91
|
-
test: RegExp;
|
|
92
|
-
type: string;
|
|
93
|
-
oneOf?: undefined;
|
|
94
|
-
generator?: undefined;
|
|
95
|
-
loader?: undefined;
|
|
96
|
-
} | {
|
|
97
|
-
test: RegExp;
|
|
98
59
|
loader: string;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
60
|
+
options: {
|
|
61
|
+
postcssOptions: {
|
|
62
|
+
plugins: string[][];
|
|
63
|
+
};
|
|
64
|
+
modules?: undefined;
|
|
65
|
+
};
|
|
102
66
|
})[];
|
|
103
|
-
test?: undefined;
|
|
104
67
|
loader?: undefined;
|
|
105
68
|
exclude?: undefined;
|
|
106
69
|
options?: undefined;
|
|
70
|
+
type?: undefined;
|
|
71
|
+
generator?: undefined;
|
|
72
|
+
} | {
|
|
73
|
+
test: RegExp;
|
|
74
|
+
type: string;
|
|
75
|
+
generator: {
|
|
76
|
+
filename: string;
|
|
77
|
+
};
|
|
78
|
+
loader?: undefined;
|
|
79
|
+
exclude?: undefined;
|
|
80
|
+
options?: undefined;
|
|
81
|
+
use?: undefined;
|
|
82
|
+
} | {
|
|
83
|
+
test: RegExp;
|
|
84
|
+
type: string;
|
|
85
|
+
loader?: undefined;
|
|
86
|
+
exclude?: undefined;
|
|
87
|
+
options?: undefined;
|
|
88
|
+
use?: undefined;
|
|
89
|
+
generator?: undefined;
|
|
90
|
+
} | {
|
|
91
|
+
test: RegExp;
|
|
92
|
+
loader: string;
|
|
93
|
+
exclude?: undefined;
|
|
94
|
+
options?: undefined;
|
|
107
95
|
use?: undefined;
|
|
96
|
+
type?: undefined;
|
|
97
|
+
generator?: undefined;
|
|
108
98
|
})[];
|
|
109
99
|
};
|
|
110
100
|
resolve: {
|
|
@@ -88,168 +88,97 @@ function default_1(_a) {
|
|
|
88
88
|
]
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
|
-
|
|
91
|
+
test: /\.css$/,
|
|
92
|
+
use: [
|
|
93
|
+
env === 'dev' ? vueStyleLoader : core_1.CssExtractRspackPlugin.loader,
|
|
92
94
|
{
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
{
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
env === 'dev'
|
|
99
|
-
? vueStyleLoader
|
|
100
|
-
: core_1.CssExtractRspackPlugin.loader,
|
|
101
|
-
{
|
|
102
|
-
loader: cssLoader,
|
|
103
|
-
options: {
|
|
104
|
-
modules: {
|
|
105
|
-
localIdentName: 'moduleStyle_[local]_[contenthash:8]',
|
|
106
|
-
namedExports: false
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
loader: postcssLoader,
|
|
112
|
-
options: {
|
|
113
|
-
postcssOptions: {
|
|
114
|
-
plugins: [['autoprefixer']]
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
]
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
use: [
|
|
122
|
-
env === 'dev'
|
|
123
|
-
? vueStyleLoader
|
|
124
|
-
: core_1.CssExtractRspackPlugin.loader,
|
|
125
|
-
cssLoader,
|
|
126
|
-
{
|
|
127
|
-
loader: postcssLoader,
|
|
128
|
-
options: {
|
|
129
|
-
postcssOptions: {
|
|
130
|
-
plugins: [['autoprefixer']]
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
]
|
|
95
|
+
loader: cssLoader,
|
|
96
|
+
options: {
|
|
97
|
+
modules: {
|
|
98
|
+
localIdentName: 'moduleStyle_[local]_[contenthash:8]',
|
|
99
|
+
namedExports: false
|
|
135
100
|
}
|
|
136
|
-
|
|
101
|
+
}
|
|
137
102
|
},
|
|
138
103
|
{
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
{
|
|
142
|
-
|
|
143
|
-
use: [
|
|
144
|
-
vueStyleLoader,
|
|
145
|
-
{
|
|
146
|
-
loader: cssLoader,
|
|
147
|
-
options: {
|
|
148
|
-
modules: {
|
|
149
|
-
localIdentName: 'moduleStyle_[local]_[contenthash:8]',
|
|
150
|
-
namedExports: false
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
loader: postcssLoader,
|
|
156
|
-
options: {
|
|
157
|
-
postcssOptions: {
|
|
158
|
-
plugins: [['autoprefixer']]
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
lessLoader
|
|
163
|
-
]
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
use: [
|
|
167
|
-
env === 'dev'
|
|
168
|
-
? vueStyleLoader
|
|
169
|
-
: core_1.CssExtractRspackPlugin.loader,
|
|
170
|
-
cssLoader,
|
|
171
|
-
{
|
|
172
|
-
loader: postcssLoader,
|
|
173
|
-
options: {
|
|
174
|
-
postcssOptions: {
|
|
175
|
-
plugins: [['autoprefixer']]
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
lessLoader
|
|
180
|
-
]
|
|
104
|
+
loader: postcssLoader,
|
|
105
|
+
options: {
|
|
106
|
+
postcssOptions: {
|
|
107
|
+
plugins: [['autoprefixer']]
|
|
181
108
|
}
|
|
182
|
-
|
|
183
|
-
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
test: /\.less$/,
|
|
115
|
+
use: [
|
|
116
|
+
env === 'dev' ? vueStyleLoader : core_1.CssExtractRspackPlugin.loader,
|
|
184
117
|
{
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
{
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
vueStyleLoader,
|
|
191
|
-
{
|
|
192
|
-
loader: cssLoader,
|
|
193
|
-
options: {
|
|
194
|
-
modules: {
|
|
195
|
-
localIdentName: 'moduleStyle_[local]_[contenthash:8]',
|
|
196
|
-
namedExports: false
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
loader: postcssLoader,
|
|
202
|
-
options: {
|
|
203
|
-
postcssOptions: {
|
|
204
|
-
plugins: [['autoprefixer']]
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
sassLoader
|
|
209
|
-
]
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
use: [
|
|
213
|
-
env === 'dev'
|
|
214
|
-
? vueStyleLoader
|
|
215
|
-
: core_1.CssExtractRspackPlugin.loader,
|
|
216
|
-
cssLoader,
|
|
217
|
-
{
|
|
218
|
-
loader: postcssLoader,
|
|
219
|
-
options: {
|
|
220
|
-
postcssOptions: {
|
|
221
|
-
plugins: [['autoprefixer']]
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
sassLoader
|
|
226
|
-
]
|
|
118
|
+
loader: cssLoader,
|
|
119
|
+
options: {
|
|
120
|
+
modules: {
|
|
121
|
+
localIdentName: 'moduleStyle_[local]_[contenthash:8]',
|
|
122
|
+
namedExports: false
|
|
227
123
|
}
|
|
228
|
-
|
|
124
|
+
}
|
|
229
125
|
},
|
|
230
126
|
{
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
127
|
+
loader: postcssLoader,
|
|
128
|
+
options: {
|
|
129
|
+
postcssOptions: {
|
|
130
|
+
plugins: [['autoprefixer']]
|
|
131
|
+
}
|
|
235
132
|
}
|
|
236
133
|
},
|
|
134
|
+
lessLoader
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
test: /\.scss$/,
|
|
139
|
+
use: [
|
|
140
|
+
vueStyleLoader,
|
|
237
141
|
{
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
142
|
+
loader: cssLoader,
|
|
143
|
+
options: {
|
|
144
|
+
modules: {
|
|
145
|
+
localIdentName: 'moduleStyle_[local]_[contenthash:8]',
|
|
146
|
+
namedExports: false
|
|
147
|
+
}
|
|
242
148
|
}
|
|
243
149
|
},
|
|
244
150
|
{
|
|
245
|
-
|
|
246
|
-
|
|
151
|
+
loader: postcssLoader,
|
|
152
|
+
options: {
|
|
153
|
+
postcssOptions: {
|
|
154
|
+
plugins: [['autoprefixer']]
|
|
155
|
+
}
|
|
156
|
+
}
|
|
247
157
|
},
|
|
248
|
-
|
|
249
|
-
test: /\.html$/,
|
|
250
|
-
loader: require.resolve('html-loader')
|
|
251
|
-
}
|
|
158
|
+
sassLoader
|
|
252
159
|
]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
test: /\.(jpg|png|gif|webp|bmp|jpeg|svg)$/,
|
|
163
|
+
type: 'asset',
|
|
164
|
+
generator: {
|
|
165
|
+
filename: 'images/[name]_[contenthash][ext]'
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
test: /\.(otf|eot|woff2?|ttf)$/i,
|
|
170
|
+
type: 'asset',
|
|
171
|
+
generator: {
|
|
172
|
+
filename: 'fonts/[name]_[contenthash][ext]'
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
test: /\.(txt|xml)$/i,
|
|
177
|
+
type: 'asset/source'
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
test: /\.html$/,
|
|
181
|
+
loader: require.resolve('html-loader')
|
|
253
182
|
}
|
|
254
183
|
]
|
|
255
184
|
},
|