5htp 0.4.2 → 0.4.3
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.
|
|
4
|
+
"version": "0.4.3",
|
|
5
5
|
"author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
|
|
6
6
|
"repository": "git://github.com/gaetanlegac/5htp.git",
|
|
7
7
|
"license": "MIT",
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
"@types/nodemailer": "^6.4.4",
|
|
89
89
|
"@types/prompts": "^2.0.14",
|
|
90
90
|
"@types/webpack-env": "^1.16.2",
|
|
91
|
+
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
91
92
|
"webpack": "^5.89.0"
|
|
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
|
|
@@ -122,7 +122,11 @@ module.exports = (app: App, side: TAppSide, dev: boolean): webpack.RuleSetRule[]
|
|
|
122
122
|
|
|
123
123
|
require('./routes/routes')({ side, app, debug: false }),
|
|
124
124
|
|
|
125
|
-
...(side === 'client' ? [
|
|
125
|
+
...(side === 'client' ? [
|
|
126
|
+
|
|
127
|
+
[require('babel-plugin-transform-remove-console')],
|
|
128
|
+
|
|
129
|
+
] : [
|
|
126
130
|
|
|
127
131
|
require('./plugins/services')({ side, app, debug: false }),
|
|
128
132
|
|
|
@@ -142,16 +146,9 @@ module.exports = (app: App, side: TAppSide, dev: boolean): webpack.RuleSetRule[]
|
|
|
142
146
|
|
|
143
147
|
require('./plugins/icones-svg')(app),
|
|
144
148
|
|
|
145
|
-
// Universal forms
|
|
146
|
-
//require('./plugins/form'),
|
|
147
|
-
|
|
148
|
-
// Generate typing from sequelize model declaration
|
|
149
|
-
//require("./plugins/models")({ side }),
|
|
150
|
-
|
|
151
149
|
...(side === 'client' ? [
|
|
152
150
|
|
|
153
151
|
] : [
|
|
154
|
-
|
|
155
152
|
//require('./plugins/queries'),
|
|
156
153
|
//require('./plugins/injection-dependances'),
|
|
157
154
|
]),
|
|
@@ -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
|
]
|