File tree Expand file tree Collapse file tree 3 files changed +20
-8
lines changed Expand file tree Collapse file tree 3 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -385,6 +385,13 @@ module.exports = function (webpackEnv) {
385
385
rules : [
386
386
// Disable require.ensure as it's not a standard language feature.
387
387
{ parser : { requireEnsure : false } } ,
388
+ // Handle node_modules packages that contain sourcemaps
389
+ shouldUseSourceMap && {
390
+ enforce : 'pre' ,
391
+ exclude : / @ b a b e l (?: \/ | \\ { 1 , 2 } ) r u n t i m e / ,
392
+ test : / \. ( j s | m j s | j s x | t s | t s x | c s s ) $ / ,
393
+ use : 'source-map-loader' ,
394
+ } ,
388
395
{
389
396
// "oneOf" will traverse all following loaders until one will
390
397
// match the requirements. When no loader matches it will fall
@@ -616,7 +623,7 @@ module.exports = function (webpackEnv) {
616
623
// Make sure to add the new loader(s) before the "file" loader.
617
624
] ,
618
625
} ,
619
- ] ,
626
+ ] . filter ( Boolean ) ,
620
627
} ,
621
628
plugins : [
622
629
// Generates an `index.html` file with the <script> injected.
Original file line number Diff line number Diff line change 84
84
"resolve-url-loader" : " ^3.1.2" ,
85
85
"sass-loader" : " ^10.0.5" ,
86
86
"semver" : " 7.3.2" ,
87
+ "source-map-loader" : " ^1.1.2" ,
87
88
"style-loader" : " 1.3.0" ,
88
89
"terser-webpack-plugin" : " 4.2.3" ,
89
90
"ts-pnp" : " 1.2.0" ,
Original file line number Diff line number Diff line change @@ -193,13 +193,17 @@ function build(previousFileSizes) {
193
193
process . env . CI . toLowerCase ( ) !== 'false' ) &&
194
194
messages . warnings . length
195
195
) {
196
- console . log (
197
- chalk . yellow (
198
- '\nTreating warnings as errors because process.env.CI = true.\n' +
199
- 'Most CI servers set it automatically.\n'
200
- )
201
- ) ;
202
- return reject ( new Error ( messages . warnings . join ( '\n\n' ) ) ) ;
196
+ // Ignore sourcemap warnings in CI builds. See #8227 for more info.
197
+ const filteredWarnings = messages . warnings . filter ( w => ! / F a i l e d t o p a r s e s o u r c e m a p / . test ( w ) ) ;
198
+ if ( filteredWarnings . length ) {
199
+ console . log (
200
+ chalk . yellow (
201
+ '\nTreating warnings as errors because process.env.CI = true.\n' +
202
+ 'Most CI servers set it automatically.\n'
203
+ )
204
+ ) ;
205
+ return reject ( new Error ( filteredWarnings . join ( '\n\n' ) ) ) ;
206
+ }
203
207
}
204
208
205
209
const resolveArgs = {
You can’t perform that action at this time.
0 commit comments