This repository was archived by the owner on Aug 29, 2025. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 4 files changed +25
-9
lines changed 
dash_core_components_base Expand file tree Collapse file tree 4 files changed +25
-9
lines changed Original file line number Diff line number Diff line change 1+ include dash_core_components/dash_core_components.css
12include dash_core_components/dash_core_components.min.js
23include dash_core_components/dash_core_components.min.js.map
34include dash_core_components/dash_core_components-shared.js
Original file line number Diff line number Diff line change 135135    },
136136])
137137
138+ _css_dist  =  [
139+     {
140+         'relative_package_path' : '{}.css' .format (__name__ ),
141+         'namespace' : 'dash_core_components' ,
142+     }
143+ ]
144+ 
138145for  _component  in  __all__ :
139-     setattr (locals ()[_component ], '_js_dist' , _js_dist )
146+     setattr (locals ()[_component ], '_js_dist' , _js_dist )
147+     setattr (locals ()[_component ], '_css_dist' , _css_dist )
Original file line number Diff line number Diff line change 7878    "exec-sh" : " ^0.3.0" 
7979    "identity-obj-proxy" : " ^3.0.0" 
8080    "jest" : " ^24.5.0" 
81+     "mini-css-extract-plugin" : " ^0.9.0" 
8182    "npm-run-all" : " ^4.1.5" 
83+     "optimize-css-assets-webpack-plugin" : " ^5.0.3" 
8284    "prettier" : " ^1.14.2" 
8385    "react" : " ^16.8.6" 
8486    "react-dom" : " ^16.8.6" 
8587    "react-jsx-parser" : " ^1.21.0" 
8688    "react-resize-detector" : " ^4.2.1" 
87-     "style-loader" : " ^0.23.1" 
8889    "styled-jsx" : " ^3.1.1" 
8990    "terser-webpack-plugin" : " ^2.3.0" 
9091    "webpack" : " ^4.37.0" 
Original file line number Diff line number Diff line change 11const  path  =  require ( 'path' ) ; 
22const  TerserPlugin  =  require ( 'terser-webpack-plugin' ) ; 
3+ const  MiniCssExtractPlugin  =  require ( "mini-css-extract-plugin" ) ; 
4+ const  OptimizeCSSAssetsPlugin  =  require ( "optimize-css-assets-webpack-plugin" ) ; 
35const  webpack  =  require ( 'webpack' ) ; 
46const  WebpackDashDynamicImport  =  require ( '@plotly/webpack-dash-dynamic-import' ) ; 
57
@@ -82,10 +84,10 @@ module.exports = (env, argv) => {
8284                    test : / \. c s s $ / , 
8385                    use : [ 
8486                        { 
85-                             loader :  'style-loader' , 
86-                             options :  { 
87-                                 insertAt :  'top' 
88-                             } 
87+                             loader :
88+                                  mode   ===   "production" 
89+                                     ?  MiniCssExtractPlugin . loader 
90+                                     :  "style-loader" , 
8991                        } , 
9092                        { 
9193                            loader : 'css-loader' , 
@@ -109,7 +111,8 @@ module.exports = (env, argv) => {
109111                        warnings : false , 
110112                        ie8 : false 
111113                    } 
112-                 } ) 
114+                 } ) , 
115+                 new  OptimizeCSSAssetsPlugin ( { } ) 
113116            ] , 
114117            splitChunks : { 
115118                name : true , 
@@ -131,11 +134,14 @@ module.exports = (env, argv) => {
131134            } 
132135        } , 
133136        plugins : [ 
134-             new  WebpackDashDynamicImport ( ) , 
137+             new  MiniCssExtractPlugin ( { 
138+                 filename : `${ dashLibraryName }  , 
139+             } ) , 
140+             //new WebpackDashDynamicImport(), 
135141            new  webpack . SourceMapDevToolPlugin ( { 
136142                filename : '[file].map' , 
137143                exclude : [ 'async~plotlyjs' ] 
138144            } ) 
139145        ] 
140146    } 
141- } ; 
147+ } ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments