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')
22const postcssrc = require ( 'postcss-load-config' )
33const ctx = { parser : true , map : 'inline' }
44const { plugins } = postcssrc . sync ( ctx )
5+ const logger = require ( '../logger' )
6+ const getVueJestConfig = require ( '../get-vue-jest-config' )
57
6- const throwError = require ( '../throw-error' )
7-
8- module . exports = ( content ) => {
8+ module . exports = ( content , filePath , jestConfig ) => {
99 let css = null
1010
1111 postcss ( plugins )
@@ -17,7 +17,10 @@ module.exports = (content) => {
1717 } )
1818 . catch ( ( e ) => {
1919 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+ }
2124 } )
2225
2326 while ( css === null ) { //eslint-disable-line
You can’t perform that action at this time.
0 commit comments