File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -659,11 +659,11 @@ class MiniCssExtractPlugin {
659659 const externalsSource = new ConcatSource ( ) ;
660660
661661 for ( const m of usedModules ) {
662- if ( / ^ @ i m p o r t u r l / . test ( m . content ) ) {
662+ let content = m . content . toString ( ) ;
663+
664+ if ( / ^ @ i m p o r t u r l / . test ( content ) ) {
663665 // HACK for IE
664666 // http://stackoverflow.com/a/14676665/1458162
665- let { content } = m ;
666-
667667 if ( m . media ) {
668668 // insert media into the @import
669669 // this is rar
@@ -681,17 +681,14 @@ class MiniCssExtractPlugin {
681681 if ( m . sourceMap ) {
682682 source . add (
683683 new SourceMapSource (
684- m . content ,
684+ content ,
685685 m . readableIdentifier ( requestShortener ) ,
686686 m . sourceMap
687687 )
688688 ) ;
689689 } else {
690690 source . add (
691- new OriginalSource (
692- m . content ,
693- m . readableIdentifier ( requestShortener )
694- )
691+ new OriginalSource ( content , m . readableIdentifier ( requestShortener ) )
695692 ) ;
696693 }
697694 source . add ( '\n' ) ;
Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ export function pitch(request) {
225225 return {
226226 identifier : module . identifier ( ) ,
227227 context : module . context ,
228- content,
228+ content : Buffer . from ( content ) ,
229229 media,
230230 sourceMap,
231231 } ;
You can’t perform that action at this time.
0 commit comments