File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 11var _ = require ( 'underscore' ) ;
2+ var webpackSources = require ( 'webpack-sources' ) ;
23
34function OptimizeCssAssetsPlugin ( options ) {
45 this . options = options || { } ;
@@ -31,14 +32,7 @@ OptimizeCssAssetsPlugin.prototype.processCss = function(css) {
3132} ;
3233
3334OptimizeCssAssetsPlugin . prototype . createCssAsset = function ( css , originalAsset ) {
34- return {
35- source : function ( ) {
36- return css ;
37- } ,
38- size : function ( ) {
39- return css . length ;
40- }
41- } ;
35+ return new webpackSources . RawSource ( css ) ;
4236} ;
4337
4438OptimizeCssAssetsPlugin . prototype . apply = function ( compiler ) {
Original file line number Diff line number Diff line change 55 "description" : " A Webpack plugin to optimize \\ minimize CSS assets." ,
66 "dependencies" : {
77 "cssnano" : " ^3.4.0" ,
8- "underscore" : " ^1.8.3"
8+ "underscore" : " ^1.8.3" ,
9+ "webpack-sources" : " ^0.1.0"
910 },
1011 "main" : " index.js" ,
1112 "homepage" : " http://github.com/NMFR/optimize-css-assets-webpack-plugin" ,
You can’t perform that action at this time.
0 commit comments