File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,10 @@ const postcss = require('postcss')
2
2
const postcssrc = require ( 'postcss-load-config' )
3
3
const ctx = { parser : true , map : 'inline' }
4
4
const { plugins } = postcssrc . sync ( ctx )
5
+ const logger = require ( '../logger' )
6
+ const getVueJestConfig = require ( '../get-vue-jest-config' )
5
7
6
- const throwError = require ( '../throw-error' )
7
-
8
- module . exports = ( content ) => {
8
+ module . exports = ( content , filePath , jestConfig ) => {
9
9
let css = null
10
10
11
11
postcss ( plugins )
@@ -17,7 +17,10 @@ module.exports = (content) => {
17
17
} )
18
18
. catch ( ( e ) => {
19
19
css = ''
20
- throwError ( e )
20
+ if ( ! getVueJestConfig ( jestConfig ) . hideStyleWarn ) {
21
+ logger . warn ( `There was an error rendering the POSTCSS in ${ filePath } . ` )
22
+ logger . warn ( `Error while compiling styles: ${ e } ` )
23
+ }
21
24
} )
22
25
23
26
while ( css === null ) { //eslint-disable-line
You can’t perform that action at this time.
0 commit comments