swico 2.0.0-beta.28 → 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.28",
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",
@@ -49,23 +49,36 @@ export default function ({ projectPath, entryPath, env, customConfig }: GlobalDa
49
49
  } | {
50
50
  oneOf: {
51
51
  test: RegExp;
52
- use: (string | {
53
- loader: string;
54
- options: {
55
- modules: {
56
- localIdentName: string;
57
- namedExport: boolean;
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;
58
62
  };
59
- postcssOptions?: undefined;
60
- };
63
+ } | {
64
+ loader: string;
65
+ options: {
66
+ postcssOptions: {
67
+ plugins: string[][];
68
+ };
69
+ modules?: undefined;
70
+ };
71
+ })[];
61
72
  } | {
62
- loader: string;
63
- options: {
64
- postcssOptions: {
65
- plugins: string[][];
73
+ use: (string | {
74
+ loader: string;
75
+ options: {
76
+ postcssOptions: {
77
+ plugins: string[][];
78
+ };
66
79
  };
67
- modules?: undefined;
68
- };
80
+ })[];
81
+ resourceQuery?: undefined;
69
82
  })[];
70
83
  }[];
71
84
  test?: undefined;
@@ -91,73 +91,138 @@ function default_1(_a) {
91
91
  oneOf: [
92
92
  {
93
93
  test: /\.css$/,
94
- use: [
95
- env === 'dev' ? vueStyleLoader : core_1.CssExtractRspackPlugin.loader,
94
+ oneOf: [
96
95
  {
97
- loader: cssLoader,
98
- options: {
99
- modules: {
100
- localIdentName: 'moduleStyle_[local]_[contenthash:8]',
101
- namedExport: false
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
+ }
102
115
  }
103
- }
116
+ ]
104
117
  },
105
118
  {
106
- loader: postcssLoader,
107
- options: {
108
- postcssOptions: {
109
- plugins: [['autoprefixer']]
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
+ }
110
131
  }
111
- }
132
+ ]
112
133
  }
113
134
  ]
114
135
  },
115
136
  {
116
137
  test: /\.less$/,
117
- use: [
118
- env === 'dev' ? vueStyleLoader : core_1.CssExtractRspackPlugin.loader,
138
+ oneOf: [
119
139
  {
120
- loader: cssLoader,
121
- options: {
122
- modules: {
123
- localIdentName: 'moduleStyle_[local]_[contenthash:8]',
124
- namedExport: false
125
- }
126
- }
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
+ ]
127
162
  },
128
163
  {
129
- loader: postcssLoader,
130
- options: {
131
- postcssOptions: {
132
- plugins: [['autoprefixer']]
133
- }
134
- }
135
- },
136
- lessLoader
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
+ ]
179
+ }
137
180
  ]
138
181
  },
139
182
  {
140
183
  test: /\.scss$/,
141
- use: [
142
- vueStyleLoader,
184
+ oneOf: [
143
185
  {
144
- loader: cssLoader,
145
- options: {
146
- modules: {
147
- localIdentName: 'moduleStyle_[local]_[contenthash:8]',
148
- namedExport: false
149
- }
150
- }
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
+ ]
151
208
  },
152
209
  {
153
- loader: postcssLoader,
154
- options: {
155
- postcssOptions: {
156
- plugins: [['autoprefixer']]
157
- }
158
- }
159
- },
160
- sassLoader
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
+ ]
225
+ }
161
226
  ]
162
227
  }
163
228
  ]