File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -2913,6 +2913,34 @@ module.exports = {
2913
2913
done ( ) ;
2914
2914
} ) ;
2915
2915
} ) ;
2916
+
2917
+ it ( 'With CSS extraction disabled and with options callback of the StyleLoader' , ( done ) => {
2918
+ const config = createWebpackConfig ( 'build' , 'dev' ) ;
2919
+ config . setPublicPath ( '/build' ) ;
2920
+ config . disableSingleRuntimeChunk ( ) ;
2921
+ config . addEntry ( 'main' , './js/css_import' ) ;
2922
+ config . disableCssExtraction ( ) ;
2923
+ config . configureStyleLoader ( ( options ) => {
2924
+ options . attributes = { id : 'TESTING_ATTRIBUTES' } ;
2925
+ } ) ;
2926
+
2927
+ testSetup . runWebpack ( config , ( webpackAssert ) => {
2928
+ expect ( config . outputPath ) . to . be . a . directory ( )
2929
+ . with . files ( [
2930
+ 'manifest.json' ,
2931
+ 'entrypoints.json' ,
2932
+ 'main.js'
2933
+ ] ) ;
2934
+
2935
+ webpackAssert . assertOutputFileContains (
2936
+ 'main.js' ,
2937
+ 'TESTING_ATTRIBUTES'
2938
+ ) ;
2939
+
2940
+ done ( ) ;
2941
+ } ) ;
2942
+ } ) ;
2943
+
2916
2944
} ) ;
2917
2945
2918
2946
if ( ! process . env . DISABLE_UNSTABLE_CHECKS ) {
You can’t perform that action at this time.
0 commit comments