@sumotto/configs 0.0.30 → 0.0.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/helpers/webpack.js +12 -0
- package/package.json +1 -1
- package/wp/tsconfig.json +1 -1
- package/wp/webpack.theme.config.js +2 -1
package/helpers/webpack.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const path = require( 'node:path' );
|
|
2
2
|
const glob = require( 'glob' );
|
|
3
3
|
const fs = require( 'fs' );
|
|
4
|
+
const browserslist = require( 'browserslist' );
|
|
4
5
|
|
|
5
6
|
require( 'dotenv' ).config( {
|
|
6
7
|
path: [
|
|
@@ -15,6 +16,12 @@ require( 'dotenv' ).config( {
|
|
|
15
16
|
],
|
|
16
17
|
} );
|
|
17
18
|
|
|
19
|
+
const browserslistConfig = browserslist.findConfig( process.cwd() );
|
|
20
|
+
if ( ! browserslistConfig ) {
|
|
21
|
+
process.env.BROWSERSLIST =
|
|
22
|
+
'> 0.05% in US and last 3 years, not dead, not UCAndroid > 0, not OperaMini all, not and_qq > 0, not kaios > 0';
|
|
23
|
+
}
|
|
24
|
+
|
|
18
25
|
const [
|
|
19
26
|
defaultConfigWP,
|
|
20
27
|
modulesConfigWP,
|
|
@@ -60,6 +67,11 @@ module.exports.Config = class {
|
|
|
60
67
|
this.entries = {};
|
|
61
68
|
this.entriesFunctions = [];
|
|
62
69
|
|
|
70
|
+
this.config.stats = 'minimal';
|
|
71
|
+
this.config.performance = {
|
|
72
|
+
maxAssetSize: 1048576, // 1MB
|
|
73
|
+
};
|
|
74
|
+
|
|
63
75
|
if ( typeof this.config.entry === 'function' ) {
|
|
64
76
|
this.entriesFunctions.push( this.config.entry );
|
|
65
77
|
} else {
|
package/package.json
CHANGED
package/wp/tsconfig.json
CHANGED
|
@@ -30,7 +30,8 @@ const defaultConfig = new Config( defaultConfigWP, 'default', port )
|
|
|
30
30
|
const last = rule.use.length - 1;
|
|
31
31
|
|
|
32
32
|
rule.use[ last ].options.sassOptions = {
|
|
33
|
-
|
|
33
|
+
loadPaths: [ resolve( rootPath, 'src/styles/partials' ) ],
|
|
34
|
+
silenceDeprecations: [ 'mixed-decls' ],
|
|
34
35
|
};
|
|
35
36
|
} )
|
|
36
37
|
.removePlugin( RtlCssPlugin )
|