@tailwindcss/vite 4.0.0-alpha.5 → 4.0.0-alpha.7
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 +12 -4
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IO as
|
|
1
|
+
import{IO as y,Parsing as w,scanFiles as h}from"@tailwindcss/oxide";import g from"path";import{compile as S,optimizeCss as x}from"tailwindcss";function M(){let r=null,l=new Set,a=new Set,u=!1;function d(e){let[t]=e.split("?",2);return g.extname(t).slice(1)==="css"}function c(){if(!r)return;let e=[];for(let t of a){let i=r.moduleGraph.getModuleById(t);if(!i){console.log("Could not find css module",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}],y.Sequential|w.Sequential)){if(!i){if(l.has(n))continue;i=!0}l.add(n)}return i}function p(e){return S(e,Array.from(l))}function v(e){return x(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(s=>{i=()=>{n=!0,s()}})}})();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&&c()},transform(e,t){if(o.tick(),t.includes("/.vite/"))return;let[i]=t.split("?",2),n=g.extname(i).slice(1);n===""||n==="css"||(f(e,n),r&&c())}},{name:"@tailwindcss/vite:generate:serve",apply:"serve",async transform(e,t){if(!(!d(t)||!e.includes("@tailwind")))return a.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"||!d(i))continue;let s=n.source,m=s instanceof Uint8Array?new TextDecoder().decode(s):s;m.includes("@tailwind")&&(n.source=v(m))}}}]}export{M as default};
|
package/package.json
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailwindcss/vite",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.7",
|
|
4
4
|
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"repository":
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",
|
|
9
|
+
"directory": "packages/@tailwindcss-vite"
|
|
10
|
+
},
|
|
7
11
|
"bugs": "https://github.com/tailwindlabs/tailwindcss/issues",
|
|
8
12
|
"homepage": "https://tailwindcss.com",
|
|
9
13
|
"files": [
|
|
10
14
|
"dist/"
|
|
11
15
|
],
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"provenance": true,
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
12
20
|
"exports": {
|
|
13
21
|
".": {
|
|
14
22
|
"types": "./dist/index.d.mts",
|
|
@@ -16,8 +24,8 @@
|
|
|
16
24
|
}
|
|
17
25
|
},
|
|
18
26
|
"dependencies": {
|
|
19
|
-
"@tailwindcss/oxide": "4.0.0-alpha.
|
|
20
|
-
"tailwindcss": "4.0.0-alpha.
|
|
27
|
+
"@tailwindcss/oxide": "4.0.0-alpha.7",
|
|
28
|
+
"tailwindcss": "4.0.0-alpha.7"
|
|
21
29
|
},
|
|
22
30
|
"devDependencies": {
|
|
23
31
|
"@types/node": "^20.11.17",
|