@tailwindcss/vite 4.0.0-alpha.8 → 4.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +1 -1
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IO as
|
|
1
|
+
import{IO as w,Parsing as S,scanFiles as h}from"@tailwindcss/oxide";import{Features as g,transform as x}from"lightningcss";import v from"path";import{compile as M}from"tailwindcss";function P(){let r=null,s=new Set,l=new Set,u=!1;function c(e){let[t]=e.split("?",2);return v.extname(t).slice(1)==="css"}function d(){if(!r)return;let e=[];for(let t of l.values()){let i=r.moduleGraph.getModuleById(t);if(!i){l.delete(t);continue}r.moduleGraph.invalidateModule(i),e.push({type:`${i.type}-update`,path:i.url,acceptedPath:i.url,timestamp:Date.now()})}e.length>0&&r.hot.send({type:"update",updates:e})}function f(e,t){let i=!1;for(let n of h([{content:e,extension:t}],w.Sequential|S.Sequential)){if(!i){if(s.has(n))continue;i=!0}s.add(n)}return i}function p(e){return M(e).build(Array.from(s))}function y(e){return C(p(e),{minify:u})}let o=(()=>{let e=50,t,i,n=!1;return{tick(){n||(t&&clearTimeout(t),t=setTimeout(i,e))},complete:new Promise(a=>{i=()=>{n=!0,a()}})}})();return[{name:"@tailwindcss/vite:scan",enforce:"pre",configureServer(e){r=e},async configResolved(e){u=e.build.cssMinify!==!1},transformIndexHtml(e){o.tick();let t=f(e,"html");r&&t&&d()},transform(e,t){if(o.tick(),t.includes("/.vite/"))return;let[i]=t.split("?",2),n=v.extname(i).slice(1);n===""||n==="css"||(f(e,n),r&&d())}},{name:"@tailwindcss/vite:generate:serve",apply:"serve",async transform(e,t){if(!(!c(t)||!e.includes("@tailwind")))return l.add(t),await o.complete,{code:p(e)}}},{name:"@tailwindcss/vite:generate:build",enforce:"post",apply:"build",generateBundle(e,t){for(let i in t){let n=t[i];if(n.type!=="asset"||!c(i))continue;let a=n.source,m=a instanceof Uint8Array?new TextDecoder().decode(a):a;m.includes("@tailwind")&&(n.source=y(m))}}}]}function C(r,{file:s="input.css",minify:l=!1}={}){return x({filename:s,code:Buffer.from(r),minify:l,sourceMap:!1,drafts:{customMedia:!0},nonStandard:{deepSelectorCombinator:!0},include:g.Nesting,exclude:g.LogicalProperties,targets:{safari:16<<16|1024},errorRecovery:!0}).code.toString()}export{P as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailwindcss/vite",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.9",
|
|
4
4
|
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,8 +24,9 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"
|
|
28
|
-
"tailwindcss": "4.0.0-alpha.
|
|
27
|
+
"lightningcss": "^1.24.0",
|
|
28
|
+
"@tailwindcss/oxide": "4.0.0-alpha.9",
|
|
29
|
+
"tailwindcss": "4.0.0-alpha.9"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"@types/node": "^20.11.17",
|