@unocss/vite
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -1481,3 +1481,4 @@ var __create = Object.create; | ||
}, | ||
async load(id) { | ||
async load(id, context) { | ||
const isSSR = context === true || (context == null ? void 0 : context.ssr) === true; | ||
if (id !== VIRTUAL_ENTRY) | ||
@@ -1487,3 +1488,7 @@ return null; | ||
const { css } = await uno.generate(tokens); | ||
return ` | ||
if (isSSR) { | ||
return `export default ${JSON.stringify(`/* unocss */ | ||
${css}`)}`; | ||
} else { | ||
return ` | ||
import { updateStyle, removeStyle } from "/@vite/client"; | ||
@@ -1499,2 +1504,3 @@ const id = "${VIRTUAL_ENTRY}" | ||
`; | ||
} | ||
}, | ||
@@ -1501,0 +1507,0 @@ transformIndexHtml: { |
{ | ||
"name": "@unocss/vite", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "", | ||
@@ -32,5 +32,5 @@ "keywords": [], | ||
"@rollup/pluginutils": "^4.1.1", | ||
"@unocss/config": "0.1.1", | ||
"@unocss/core": "0.1.1", | ||
"@unocss/scope": "0.1.1", | ||
"@unocss/config": "0.1.2", | ||
"@unocss/core": "0.1.2", | ||
"@unocss/scope": "0.1.2", | ||
"nanoevents": "^6.0.2" | ||
@@ -37,0 +37,0 @@ }, |
Sorry, the diff of this file is not supported yet
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
99135
3396
+ Added@unocss/config@0.1.2(transitive)
+ Added@unocss/core@0.1.2(transitive)
+ Added@unocss/scope@0.1.2(transitive)
- Removed@unocss/config@0.1.1(transitive)
- Removed@unocss/core@0.1.1(transitive)
- Removed@unocss/scope@0.1.1(transitive)
Updated@unocss/config@0.1.2
Updated@unocss/core@0.1.2
Updated@unocss/scope@0.1.2