swico 2.0.0-beta.27 → 2.0.0-beta.29

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.0.0-beta.27",
3
+ "version": "2.0.0-beta.29",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -21,6 +21,7 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
21
21
  experimentalInlineMatchResource: boolean;
22
22
  };
23
23
  use?: undefined;
24
+ oneOf?: undefined;
24
25
  type?: undefined;
25
26
  generator?: undefined;
26
27
  } | {
@@ -42,31 +43,49 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
42
43
  }[];
43
44
  loader?: undefined;
44
45
  options?: undefined;
46
+ oneOf?: undefined;
45
47
  type?: undefined;
46
48
  generator?: undefined;
47
49
  } | {
48
- test: RegExp;
49
- use: (string | {
50
- loader: string;
51
- options: {
52
- modules: {
53
- localIdentName: string;
54
- namedExports: boolean;
55
- };
56
- postcssOptions?: undefined;
57
- };
58
- } | {
59
- loader: string;
60
- options: {
61
- postcssOptions: {
62
- plugins: string[][];
63
- };
64
- modules?: undefined;
65
- };
66
- })[];
50
+ oneOf: {
51
+ test: RegExp;
52
+ oneOf: ({
53
+ resourceQuery: RegExp;
54
+ use: (string | {
55
+ loader: string;
56
+ options: {
57
+ modules: {
58
+ localIdentName: string;
59
+ namedExport: boolean;
60
+ };
61
+ postcssOptions?: undefined;
62
+ };
63
+ } | {
64
+ loader: string;
65
+ options: {
66
+ postcssOptions: {
67
+ plugins: string[][];
68
+ };
69
+ modules?: undefined;
70
+ };
71
+ })[];
72
+ } | {
73
+ use: (string | {
74
+ loader: string;
75
+ options: {
76
+ postcssOptions: {
77
+ plugins: string[][];
78
+ };
79
+ };
80
+ })[];
81
+ resourceQuery?: undefined;
82
+ })[];
83
+ }[];
84
+ test?: undefined;
67
85
  loader?: undefined;
68
86
  exclude?: undefined;
69
87
  options?: undefined;
88
+ use?: undefined;
70
89
  type?: undefined;
71
90
  generator?: undefined;
72
91
  } | {
@@ -79,6 +98,7 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
79
98
  exclude?: undefined;
80
99
  options?: undefined;
81
100
  use?: undefined;
101
+ oneOf?: undefined;
82
102
  } | {
83
103
  test: RegExp;
84
104
  type: string;
@@ -86,6 +106,7 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
86
106
  exclude?: undefined;
87
107
  options?: undefined;
88
108
  use?: undefined;
109
+ oneOf?: undefined;
89
110
  generator?: undefined;
90
111
  } | {
91
112
  test: RegExp;
@@ -93,6 +114,7 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
93
114
  exclude?: undefined;
94
115
  options?: undefined;
95
116
  use?: undefined;
117
+ oneOf?: undefined;
96
118
  type?: undefined;
97
119
  generator?: undefined;
98
120
  })[];
@@ -88,74 +88,143 @@ function default_1(_a) {
88
88
  ]
89
89
  },
90
90
  {
91
- test: /\.css$/,
92
- use: [
93
- env === 'dev' ? vueStyleLoader : core_1.CssExtractRspackPlugin.loader,
94
- {
95
- loader: cssLoader,
96
- options: {
97
- modules: {
98
- localIdentName: 'moduleStyle_[local]_[contenthash:8]',
99
- namedExports: false
100
- }
101
- }
102
- },
103
- {
104
- loader: postcssLoader,
105
- options: {
106
- postcssOptions: {
107
- plugins: [['autoprefixer']]
108
- }
109
- }
110
- }
111
- ]
112
- },
113
- {
114
- test: /\.less$/,
115
- use: [
116
- env === 'dev' ? vueStyleLoader : core_1.CssExtractRspackPlugin.loader,
117
- {
118
- loader: cssLoader,
119
- options: {
120
- modules: {
121
- localIdentName: 'moduleStyle_[local]_[contenthash:8]',
122
- namedExports: false
123
- }
124
- }
125
- },
91
+ oneOf: [
126
92
  {
127
- loader: postcssLoader,
128
- options: {
129
- postcssOptions: {
130
- plugins: [['autoprefixer']]
93
+ test: /\.css$/,
94
+ oneOf: [
95
+ {
96
+ resourceQuery: /module/,
97
+ use: [
98
+ vueStyleLoader,
99
+ {
100
+ loader: cssLoader,
101
+ options: {
102
+ modules: {
103
+ localIdentName: 'moduleStyle_[local]_[contenthash:8]',
104
+ namedExport: false
105
+ }
106
+ }
107
+ },
108
+ {
109
+ loader: postcssLoader,
110
+ options: {
111
+ postcssOptions: {
112
+ plugins: [['autoprefixer']]
113
+ }
114
+ }
115
+ }
116
+ ]
117
+ },
118
+ {
119
+ use: [
120
+ env === 'dev'
121
+ ? vueStyleLoader
122
+ : core_1.CssExtractRspackPlugin.loader,
123
+ cssLoader,
124
+ {
125
+ loader: postcssLoader,
126
+ options: {
127
+ postcssOptions: {
128
+ plugins: [['autoprefixer']]
129
+ }
130
+ }
131
+ }
132
+ ]
131
133
  }
132
- }
134
+ ]
133
135
  },
134
- lessLoader
135
- ]
136
- },
137
- {
138
- test: /\.scss$/,
139
- use: [
140
- vueStyleLoader,
141
136
  {
142
- loader: cssLoader,
143
- options: {
144
- modules: {
145
- localIdentName: 'moduleStyle_[local]_[contenthash:8]',
146
- namedExports: false
137
+ test: /\.less$/,
138
+ oneOf: [
139
+ {
140
+ resourceQuery: /module/,
141
+ use: [
142
+ vueStyleLoader,
143
+ {
144
+ loader: cssLoader,
145
+ options: {
146
+ modules: {
147
+ localIdentName: 'moduleStyle_[local]_[contenthash:8]',
148
+ namedExport: false
149
+ }
150
+ }
151
+ },
152
+ {
153
+ loader: postcssLoader,
154
+ options: {
155
+ postcssOptions: {
156
+ plugins: [['autoprefixer']]
157
+ }
158
+ }
159
+ },
160
+ lessLoader
161
+ ]
162
+ },
163
+ {
164
+ use: [
165
+ env === 'dev'
166
+ ? vueStyleLoader
167
+ : core_1.CssExtractRspackPlugin.loader,
168
+ cssLoader,
169
+ {
170
+ loader: postcssLoader,
171
+ options: {
172
+ postcssOptions: {
173
+ plugins: [['autoprefixer']]
174
+ }
175
+ }
176
+ },
177
+ lessLoader
178
+ ]
147
179
  }
148
- }
180
+ ]
149
181
  },
150
182
  {
151
- loader: postcssLoader,
152
- options: {
153
- postcssOptions: {
154
- plugins: [['autoprefixer']]
183
+ test: /\.scss$/,
184
+ oneOf: [
185
+ {
186
+ resourceQuery: /module/,
187
+ use: [
188
+ vueStyleLoader,
189
+ {
190
+ loader: cssLoader,
191
+ options: {
192
+ modules: {
193
+ localIdentName: 'moduleStyle_[local]_[contenthash:8]',
194
+ namedExport: false
195
+ }
196
+ }
197
+ },
198
+ {
199
+ loader: postcssLoader,
200
+ options: {
201
+ postcssOptions: {
202
+ plugins: [['autoprefixer']]
203
+ }
204
+ }
205
+ },
206
+ sassLoader
207
+ ]
208
+ },
209
+ {
210
+ use: [
211
+ env === 'dev'
212
+ ? vueStyleLoader
213
+ : core_1.CssExtractRspackPlugin.loader,
214
+ cssLoader,
215
+ {
216
+ loader: postcssLoader,
217
+ options: {
218
+ postcssOptions: {
219
+ plugins: [['autoprefixer']]
220
+ }
221
+ }
222
+ },
223
+ sassLoader
224
+ ]
155
225
  }
156
- }
157
- },
158
- sassLoader
226
+ ]
227
+ }
159
228
  ]
160
229
  },
161
230
  {