5htp 0.4.2 → 0.4.3-2
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "5htp",
|
|
3
3
|
"description": "Convenient TypeScript framework designed for Performance and Productivity.",
|
|
4
|
-
"version": "0.4.2",
|
|
4
|
+
"version": "0.4.3-2",
|
|
5
5
|
"author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
|
|
6
6
|
"repository": "git://github.com/gaetanlegac/5htp.git",
|
|
7
7
|
"license": "MIT",
|
|
@@ -78,7 +78,9 @@
|
|
|
78
78
|
"webpack-dev-middleware": "^5.1.0",
|
|
79
79
|
"webpack-hot-middleware": "^2.25.0",
|
|
80
80
|
"webpack-node-externals": "^3.0.0",
|
|
81
|
-
"webpack-virtual-modules": "^0.4.3"
|
|
81
|
+
"webpack-virtual-modules": "^0.4.3",
|
|
82
|
+
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
83
|
+
"webpack": "^5.89.0"
|
|
82
84
|
},
|
|
83
85
|
"devDependencies": {
|
|
84
86
|
"@types/babel__preset-env": "^7.9.6",
|
|
@@ -87,7 +89,6 @@
|
|
|
87
89
|
"@types/node": "^16.9.1",
|
|
88
90
|
"@types/nodemailer": "^6.4.4",
|
|
89
91
|
"@types/prompts": "^2.0.14",
|
|
90
|
-
"@types/webpack-env": "^1.16.2"
|
|
91
|
-
"webpack": "^5.89.0"
|
|
92
|
+
"@types/webpack-env": "^1.16.2"
|
|
92
93
|
}
|
|
93
94
|
}
|
package/src/commands/build.ts
CHANGED
|
@@ -245,27 +245,21 @@ export default function createCompiler( app: App, mode: TCompileMode ): webpack.
|
|
|
245
245
|
// Minimum size, in bytes, for a chunk to be generated.
|
|
246
246
|
// Pour les imports async (ex: pages), on crée systématiquemen un chunk séparé
|
|
247
247
|
// Afin que le css d'une page ne soit appliqué qu'à la page concernée
|
|
248
|
-
minSize: 0,
|
|
249
|
-
|
|
250
248
|
cacheGroups: {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
const packageName = module.context.match(
|
|
256
|
-
/[\\/]node_modules[\\/](.*?)([\\/]|$)/,
|
|
257
|
-
)[1];
|
|
258
|
-
return `npm.${packageName.replace('@', '')}`;
|
|
249
|
+
defaultVendors: {
|
|
250
|
+
test: (module) => {
|
|
251
|
+
// Check if the module is in node_modules but not in node_modules/5htp-core
|
|
252
|
+
return /[\\/]node_modules[\\/]/.test(module.context) && !/[\\/]node_modules[\\/]5htp-core[\\/]/.test(module.context);
|
|
259
253
|
},
|
|
260
254
|
priority: -10,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
255
|
+
reuseExistingChunk: true,
|
|
256
|
+
},
|
|
257
|
+
default: {
|
|
264
258
|
minChunks: 2,
|
|
265
259
|
priority: -20,
|
|
266
|
-
reuseExistingChunk: true
|
|
267
|
-
}
|
|
268
|
-
},
|
|
260
|
+
reuseExistingChunk: true,
|
|
261
|
+
},
|
|
262
|
+
},
|
|
269
263
|
},
|
|
270
264
|
|
|
271
265
|
// Production
|
|
@@ -117,12 +117,20 @@ module.exports = (app: App, side: TAppSide, dev: boolean): webpack.RuleSetRule[]
|
|
|
117
117
|
"transform": "lodash/${member}",
|
|
118
118
|
"preventFullImport": true
|
|
119
119
|
}
|
|
120
|
-
}]
|
|
120
|
+
}],
|
|
121
|
+
|
|
122
|
+
...(side === 'client' ? [
|
|
123
|
+
|
|
124
|
+
[require('babel-plugin-transform-remove-console')],
|
|
125
|
+
|
|
126
|
+
] : [])
|
|
121
127
|
]),
|
|
122
128
|
|
|
123
129
|
require('./routes/routes')({ side, app, debug: false }),
|
|
124
130
|
|
|
125
|
-
...(side === 'client' ? [
|
|
131
|
+
...(side === 'client' ? [
|
|
132
|
+
|
|
133
|
+
] : [
|
|
126
134
|
|
|
127
135
|
require('./plugins/services')({ side, app, debug: false }),
|
|
128
136
|
|
|
@@ -142,16 +150,9 @@ module.exports = (app: App, side: TAppSide, dev: boolean): webpack.RuleSetRule[]
|
|
|
142
150
|
|
|
143
151
|
require('./plugins/icones-svg')(app),
|
|
144
152
|
|
|
145
|
-
// Universal forms
|
|
146
|
-
//require('./plugins/form'),
|
|
147
|
-
|
|
148
|
-
// Generate typing from sequelize model declaration
|
|
149
|
-
//require("./plugins/models")({ side }),
|
|
150
|
-
|
|
151
153
|
...(side === 'client' ? [
|
|
152
154
|
|
|
153
155
|
] : [
|
|
154
|
-
|
|
155
156
|
//require('./plugins/queries'),
|
|
156
157
|
//require('./plugins/injection-dependances'),
|
|
157
158
|
]),
|
|
@@ -183,8 +183,8 @@ export default function createCompiler( app: App, mode: TCompileMode ): webpack.
|
|
|
183
183
|
new TerserPlugin({
|
|
184
184
|
terserOptions: {
|
|
185
185
|
// Consere les classnames
|
|
186
|
-
keep_classnames: true,
|
|
187
|
-
keep_fnames: true
|
|
186
|
+
//keep_classnames: true,
|
|
187
|
+
//keep_fnames: true,
|
|
188
188
|
}
|
|
189
189
|
}),
|
|
190
190
|
]
|