@cloudbase/framework-plugin-low-code 0.6.31 → 0.6.32
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/template/webpack/web.prod.js +65 -85
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/framework-plugin-low-code",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.32",
|
|
4
4
|
"description": "云开发 Tencent CloudBase Framework Low Code Plugin,将低码配置生成完整项目并一键部署云开发资源。",
|
|
5
5
|
"author": "yhsunshining@gmail.com",
|
|
6
6
|
"homepage": "https://github.com/TencentCloudBase/cloudbase-framework#readme",
|
|
@@ -92,22 +92,16 @@ module.exports = function (options) {
|
|
|
92
92
|
threadMode: true,
|
|
93
93
|
loaders: {
|
|
94
94
|
js: [babelLoader],
|
|
95
|
-
ts: [
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
],
|
|
99
|
-
}
|
|
100
|
-
}
|
|
95
|
+
ts: [babelLoader, typescriptLoader],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
101
98
|
},
|
|
102
99
|
],
|
|
103
|
-
threadPool: happyThreadPool
|
|
100
|
+
threadPool: happyThreadPool,
|
|
104
101
|
}),
|
|
105
102
|
new HappyPack({
|
|
106
103
|
id: TS_LOADER_ID,
|
|
107
|
-
loaders: [
|
|
108
|
-
babelLoader,
|
|
109
|
-
typescriptLoader,
|
|
110
|
-
],
|
|
104
|
+
loaders: [babelLoader, typescriptLoader],
|
|
111
105
|
threadPool: happyThreadPool,
|
|
112
106
|
}),
|
|
113
107
|
new HappyPack({
|
|
@@ -125,13 +119,15 @@ module.exports = function (options) {
|
|
|
125
119
|
filename: '[name].[contenthash].css',
|
|
126
120
|
chunkFilename: '[id].[contenthash].css',
|
|
127
121
|
}),
|
|
128
|
-
new webpack.DefinePlugin(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
122
|
+
new webpack.DefinePlugin(
|
|
123
|
+
Object.assign(
|
|
124
|
+
{
|
|
125
|
+
'process.env.isMiniprogram': false, // 注入环境变量,用于业务代码判断
|
|
126
|
+
'process.env.SSR': false,
|
|
127
|
+
},
|
|
128
|
+
definePlugin
|
|
129
|
+
)
|
|
130
|
+
),
|
|
135
131
|
new CopyWebpackPlugin({
|
|
136
132
|
patterns: [
|
|
137
133
|
{
|
|
@@ -157,6 +153,36 @@ module.exports = function (options) {
|
|
|
157
153
|
}),
|
|
158
154
|
]);
|
|
159
155
|
}
|
|
156
|
+
|
|
157
|
+
const cssLoaders = [
|
|
158
|
+
MiniCssExtractPlugin.loader,
|
|
159
|
+
{
|
|
160
|
+
loader: 'css-loader',
|
|
161
|
+
options: {
|
|
162
|
+
modules: false,
|
|
163
|
+
importLoaders: 2,
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
loader: 'postcss-loader',
|
|
168
|
+
options: {
|
|
169
|
+
postcssOptions: {
|
|
170
|
+
plugins: [
|
|
171
|
+
[
|
|
172
|
+
'postcss-pxtorem',
|
|
173
|
+
{
|
|
174
|
+
rootValue: 14,
|
|
175
|
+
propList: ['*'],
|
|
176
|
+
// todo
|
|
177
|
+
selectorBlackList: ['.weui-picker__indicator'],
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
];
|
|
185
|
+
|
|
160
186
|
return {
|
|
161
187
|
context,
|
|
162
188
|
entry,
|
|
@@ -184,7 +210,7 @@ module.exports = function (options) {
|
|
|
184
210
|
rules: [
|
|
185
211
|
{
|
|
186
212
|
test: /\.vue$/,
|
|
187
|
-
loader: 'happypack/loader?id=vue'
|
|
213
|
+
loader: 'happypack/loader?id=vue',
|
|
188
214
|
},
|
|
189
215
|
{
|
|
190
216
|
test: /\.tsx?$/,
|
|
@@ -199,32 +225,7 @@ module.exports = function (options) {
|
|
|
199
225
|
{
|
|
200
226
|
test: /\.(scss|sass)$/,
|
|
201
227
|
use: [
|
|
202
|
-
|
|
203
|
-
{
|
|
204
|
-
loader: 'css-loader',
|
|
205
|
-
options: {
|
|
206
|
-
modules: false,
|
|
207
|
-
importLoaders: 2,
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
loader: 'postcss-loader',
|
|
212
|
-
options: {
|
|
213
|
-
postcssOptions: {
|
|
214
|
-
plugins: [
|
|
215
|
-
[
|
|
216
|
-
'postcss-pxtorem',
|
|
217
|
-
{
|
|
218
|
-
rootValue: 14,
|
|
219
|
-
propList: ['*'],
|
|
220
|
-
// todo
|
|
221
|
-
selectorBlackList: ['.weui-picker__indicator'],
|
|
222
|
-
},
|
|
223
|
-
],
|
|
224
|
-
],
|
|
225
|
-
},
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
|
+
...cssLoaders,
|
|
228
229
|
{
|
|
229
230
|
loader: 'sass-loader',
|
|
230
231
|
options: {
|
|
@@ -234,34 +235,13 @@ module.exports = function (options) {
|
|
|
234
235
|
],
|
|
235
236
|
},
|
|
236
237
|
{
|
|
237
|
-
test: /\.
|
|
238
|
+
test: /\.css$/,
|
|
239
|
+
use: [...cssLoaders],
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
test: /\.less$/,
|
|
238
243
|
use: [
|
|
239
|
-
|
|
240
|
-
{
|
|
241
|
-
loader: 'css-loader',
|
|
242
|
-
options: {
|
|
243
|
-
modules: false,
|
|
244
|
-
importLoaders: 2,
|
|
245
|
-
},
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
loader: 'postcss-loader',
|
|
249
|
-
options: {
|
|
250
|
-
postcssOptions: {
|
|
251
|
-
plugins: [
|
|
252
|
-
[
|
|
253
|
-
'postcss-pxtorem',
|
|
254
|
-
{
|
|
255
|
-
rootValue: 14,
|
|
256
|
-
propList: ['*'],
|
|
257
|
-
// todo
|
|
258
|
-
selectorBlackList: ['.weui-picker__indicator'],
|
|
259
|
-
},
|
|
260
|
-
],
|
|
261
|
-
],
|
|
262
|
-
},
|
|
263
|
-
},
|
|
264
|
-
},
|
|
244
|
+
...cssLoaders,
|
|
265
245
|
{
|
|
266
246
|
loader: 'less-loader',
|
|
267
247
|
options: {
|
|
@@ -310,20 +290,20 @@ module.exports = function (options) {
|
|
|
310
290
|
},
|
|
311
291
|
...(isDevelopment
|
|
312
292
|
? {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
293
|
+
minimize: false,
|
|
294
|
+
removeAvailableModules: false,
|
|
295
|
+
removeEmptyChunks: true,
|
|
296
|
+
}
|
|
317
297
|
: {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
298
|
+
minimizer: [
|
|
299
|
+
new TerserPlugin({
|
|
300
|
+
test: /\.js(\?.*)?$/i,
|
|
301
|
+
cache: false,
|
|
302
|
+
parallel: true,
|
|
303
|
+
sourceMap: false,
|
|
304
|
+
}),
|
|
305
|
+
],
|
|
306
|
+
}),
|
|
327
307
|
},
|
|
328
308
|
};
|
|
329
309
|
};
|