mini-css-extract-plugin
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -685,2 +685,4 @@ "use strict"; | ||
const readableIdentifier = module.readableIdentifier(requestShortener); | ||
const startsWithAtRuleImport = /^@import url/.test(content); | ||
let header; | ||
@@ -692,8 +694,12 @@ if (compilation.outputOptions.pathinfo) { | ||
const headerStr = `/*!****${reqStrStar}****!*\\\n !*** ${reqStr} ***!\n \\****${reqStrStar}****/\n`; | ||
content = headerStr + content; | ||
header = new RawSource(headerStr); | ||
} | ||
if (/^@import url/.test(content)) { | ||
// HACK for IE | ||
if (startsWithAtRuleImport) { | ||
if (typeof header !== "undefined") { | ||
externalsSource.add(header); | ||
} // HACK for IE | ||
// http://stackoverflow.com/a/14676665/1458162 | ||
if (module.media) { | ||
@@ -709,2 +715,6 @@ // insert media into the @import | ||
} else { | ||
if (typeof header !== "undefined") { | ||
source.add(header); | ||
} | ||
if (module.media) { | ||
@@ -711,0 +721,0 @@ source.add(`@media ${module.media} {\n`); |
{ | ||
"name": "mini-css-extract-plugin", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "extracts CSS into separate files", | ||
@@ -32,2 +32,3 @@ "license": "MIT", | ||
"test:only": "cross-env NODE_ENV=test jest", | ||
"test:only:experimental": "EXPERIMENTAL_USE_IMPORT_MODULE=true cross-env NODE_ENV=test jest", | ||
"test:watch": "npm run test:only -- --watch", | ||
@@ -69,3 +70,3 @@ "test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage", | ||
"jest": "^27.0.6", | ||
"jsdom": "^16.7.0", | ||
"jsdom": "^17.0.0", | ||
"lint-staged": "^11.1.1", | ||
@@ -78,3 +79,3 @@ "memfs": "^3.0.2", | ||
"webpack-cli": "^4.7.2", | ||
"webpack-dev-server": "^3.11.2" | ||
"webpack-dev-server": "^4.0.0" | ||
}, | ||
@@ -81,0 +82,0 @@ "keywords": [ |
@@ -172,3 +172,3 @@ <div align="center"> | ||
If defined, the `mini-css-extract-plugin` will attach given attributes with their values on <link> element. | ||
If defined, the `mini-css-extract-plugin` will attach given attributes with their values on `<link>` element. | ||
@@ -207,3 +207,3 @@ **webpack.config.js** | ||
This option allows loading asynchronous chunks with a custom link type, such as <link type="text/css" ...>. | ||
This option allows loading asynchronous chunks with a custom link type, such as `<link type="text/css" ...>`. | ||
@@ -210,0 +210,0 @@ ##### `String` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81552
1284