@senojs/rollup-plugin-style-inject
Advanced tools
Comparing version 0.2.2 to 0.2.3
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.2.3](https://github.com/senoteam/vite-plugin/compare/@senojs/rollup-plugin-style-inject@0.2.2...@senojs/rollup-plugin-style-inject@0.2.3) (2022-12-28) | ||
### Reverts | ||
* Revert "perf: 🧊 fixed output order of css" ([5ad8c91](https://github.com/senoteam/vite-plugin/commit/5ad8c9194203540f707b3851137d4f00879834e4)) | ||
## [0.2.2](https://github.com/senoteam/vite-plugin/compare/@senojs/rollup-plugin-style-inject@0.2.1...@senojs/rollup-plugin-style-inject@0.2.2) (2022-12-21) | ||
@@ -8,0 +19,0 @@ |
10
index.js
@@ -19,3 +19,3 @@ import path from 'node:path' | ||
export default ({ insertAt = 'top' } = {}) => { | ||
const cssCodes = {} | ||
const cssCodes = [] | ||
const cssLangs = ['.css', '.less'] | ||
@@ -28,3 +28,3 @@ return { | ||
if (isCSS) { | ||
cssCodes[id] = code | ||
cssCodes.push(code) | ||
return { code: '', map: null } | ||
@@ -36,7 +36,5 @@ } | ||
if (chunk.isEntry) { | ||
const cssIDs = Object.keys(cssCodes).sort() | ||
const cssString = cssIDs | ||
.map((id) => cssCodes[id]) | ||
const cssString = cssCodes | ||
.join('') | ||
.replace(/ *\\9/g, '') // remove hack code for IE9 | ||
.replace(/ *\\9/g, '') | ||
.replace(/\\(\d+)/g, '0o$1') | ||
@@ -43,0 +41,0 @@ const injections = `injectStyle(${JSON.stringify(cssString)}, '${insertAt}')` |
{ | ||
"name": "@senojs/rollup-plugin-style-inject", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "rollup-plugin-style-inject", | ||
@@ -32,3 +32,3 @@ "type": "module", | ||
}, | ||
"gitHead": "3bd4a94fbacbf313f79fcc74b70ec0c51a043d89" | ||
"gitHead": "759d5820bbda5eacde8e90ef85bc36d870f6bfa9" | ||
} |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
5451
168
0
41