Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -659,11 +659,11 @@ class MiniCssExtractPlugin {
const externalsSource = new ConcatSource();

for (const m of usedModules) {
if (/^@import url/.test(m.content)) {
let content = m.content.toString();

if (/^@import url/.test(content)) {
// HACK for IE
// http://stackoverflow.com/a/14676665/1458162
let { content } = m;

if (m.media) {
// insert media into the @import
// this is rar
Expand All @@ -681,17 +681,14 @@ class MiniCssExtractPlugin {
if (m.sourceMap) {
source.add(
new SourceMapSource(
m.content,
content,
m.readableIdentifier(requestShortener),
m.sourceMap
)
);
} else {
source.add(
new OriginalSource(
m.content,
m.readableIdentifier(requestShortener)
)
new OriginalSource(content, m.readableIdentifier(requestShortener))
);
}
source.add('\n');
Expand Down
2 changes: 1 addition & 1 deletion src/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export function pitch(request) {
return {
identifier: module.identifier(),
context: module.context,
content,
content: Buffer.from(content),
media,
sourceMap,
};
Expand Down