This repository was archived by the owner on Jun 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +26
-4
lines changed Expand file tree Collapse file tree 4 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ module.exports = {
12
12
13
13
console . log ( `\u{1b}[31m[ ${ title } ]\u{1b}[0m` ) ;
14
14
console . log ( `\u{1b}[33m${ error } \u{1b}[0m` ) ;
15
+ console . log ( error ) ;
15
16
16
17
return callback ? callback ( ) : null ;
17
18
} ,
Original file line number Diff line number Diff line change 43
43
"gulp-sass" : " 4.0.2" ,
44
44
"gulp-sourcemaps" : " 2.6.5" ,
45
45
"htmlhint-stylish" : " 1.0.3" ,
46
- "node-notifier" : " 6 .0.0" ,
46
+ "node-notifier" : " 7 .0.0" ,
47
47
"postcss-import" : " 12.0.1" ,
48
48
"postcss-sort-media-queries" : " 1.4.23" ,
49
- "rollup" : " 2.2.0 " ,
49
+ "rollup" : " 2.7.1 " ,
50
50
"rollup-plugin-babel" : " 4.4.0" ,
51
51
"rollup-plugin-terser" : " 5.3.0" ,
52
52
"sass" : " 1.26.3"
Original file line number Diff line number Diff line change @@ -30,19 +30,32 @@ module.exports = function () {
30
30
production ? terser ( ) : null ,
31
31
] ,
32
32
onwarn ( warning , warn ) {
33
+ // skip certain warnings
34
+ if (
35
+ warning . code === 'UNUSED_EXTERNAL_IMPORT'
36
+ || warning . code === 'THIS_IS_UNDEFINED'
37
+ || warning . code === 'NON_EXISTENT_EXPORT'
38
+ )
39
+ return ;
40
+
33
41
throw new Error ( warning . message ) ;
34
42
} ,
35
43
} ) ;
36
44
37
45
const tempJs = await bundle . write ( {
38
46
file : `./${ global . folder . temp } /js/${ global . file . vendorJsTemp } ` ,
39
- format : 'iife ' ,
47
+ format : 'esm ' ,
40
48
name : 'vendor' ,
41
49
sourcemap : false ,
42
50
} ) ;
43
51
const tempJsFileName = tempJs . output [ 0 ] . fileName ;
44
52
45
- gulp . src ( filesExist ( [ ...vendorFiles , `./${ global . folder . temp } /js/${ tempJsFileName } ` ] ) )
53
+ gulp . src (
54
+ filesExist ( [
55
+ ...vendorFiles ,
56
+ `./${ global . folder . temp } /js/${ tempJsFileName } ` ,
57
+ ] ) ,
58
+ )
46
59
. pipe ( concat ( vendorFileName ) )
47
60
. pipe ( gulp . dest ( `./${ global . folder . dev } /js` ) ) ;
48
61
} catch ( error ) {
Original file line number Diff line number Diff line change @@ -25,6 +25,14 @@ module.exports = function () {
25
25
production ? terser ( ) : null ,
26
26
] ,
27
27
onwarn ( warning , warn ) {
28
+ // skip certain warnings
29
+ if (
30
+ warning . code === 'UNUSED_EXTERNAL_IMPORT'
31
+ || warning . code === 'THIS_IS_UNDEFINED'
32
+ || warning . code === 'NON_EXISTENT_EXPORT'
33
+ )
34
+ return ;
35
+
28
36
throw new Error ( warning . message ) ;
29
37
} ,
30
38
} ) ;
You can’t perform that action at this time.
0 commit comments