@tailwindcss/vite 4.0.0-alpha.17 → 4.0.0-alpha.18
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 +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{IO as
|
|
1
|
+
var d=(i=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(i,{get:(s,l)=>(typeof require<"u"?require:s)[l]}):i)(function(i){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+i+'" is not supported')});import{IO as P,Parsing as x,scanFiles as M}from"@tailwindcss/oxide";import{Features as y,transform as R}from"lightningcss";import u from"path";import{compile as q}from"tailwindcss";function k(){let i=null,s=new Set,l={},f=!1,c=!1,m=[];function p(e){if(!i)return;let t=[];for(let r of Object.keys(l)){let n=i.moduleGraph.getModuleById(r);if(!n){e||delete l[r];continue}i.moduleGraph.invalidateModule(n),t.push({type:`${n.type}-update`,path:n.url,acceptedPath:n.url,timestamp:Date.now()})}t.length>0&&i.hot.send({type:"update",updates:t})}function g(e,t){let r=!1;for(let n of M([{content:e,extension:t}],P.Sequential|x.Sequential)){if(!r){if(s.has(n))continue;r=!0}s.add(n)}return r}function h(e,t){let r=u.dirname(u.resolve(t));return q(e,{loadPlugin:n=>n[0]==="."?d(u.resolve(r,n)):d(n)}).build(Array.from(s))}function S(e,t){return F(h(e,t),{minify:c})}async function v(e,t,r){let n={...e,getCombinedSourcemap:()=>{throw new Error("getCombinedSourcemap not implemented")}};for(let a of m){if(!a.transform)continue;let C="handler"in a.transform?a.transform.handler:a.transform;try{let o=await C.call(n,r,t);if(!o)continue;typeof o=="string"?r=o:o.code&&(r=o.code)}catch{console.error(`Error running ${a.name} on Tailwind CSS output. Skipping.`)}}return r}return[{name:"@tailwindcss/vite:scan",enforce:"pre",configureServer(e){i=e},async configResolved(e){c=e.build.cssMinify!==!1,f=e.build.ssr!==!1&&e.build.ssr!==void 0;let t=["vite:css",...e.command==="build"?["vite:css-post"]:[]];m=e.plugins.filter(r=>t.includes(r.name))},transformIndexHtml(e){g(e,"html")&&p(f)},transform(e,t,r){if(t.includes("/.vite/"))return;let n=b(t);n===""||n==="css"||(g(e,n),p(r?.ssr??!1))}},{name:"@tailwindcss/vite:generate:serve",apply:"serve",async transform(e,t,r){return w(t,e)?(l[t]={content:"",handled:!0},r?.ssr||await i?.waitForRequestsIdle?.(t),{code:await v(this,t,h(e,t))}):void 0}},{name:"@tailwindcss/vite:generate:build",apply:"build",transform(e,t){w(t,e)&&(l[t]={content:e,handled:!1})},async renderChunk(e,t){for(let[r,n]of Object.entries(l)){if(n.handled)continue;let a=S(n.content,r);await v(this,r,a),n.handled=!0}}}]}function b(i){let[s]=i.split("?",2);return u.extname(s).slice(1)}function w(i,s){if(!i.includes("/.vite/"))return b(i)==="css"&&s.includes("@tailwind")}function F(i,{file:s="input.css",minify:l=!1}={}){return R({filename:s,code:Buffer.from(i),minify:l,sourceMap:!1,drafts:{customMedia:!0},nonStandard:{deepSelectorCombinator:!0},include:y.Nesting,exclude:y.LogicalProperties,targets:{safari:16<<16|1024},errorRecovery:!0}).code.toString()}export{k 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.18",
|
|
4
4
|
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"lightningcss": "^1.25.1",
|
|
28
|
-
"@tailwindcss/oxide": "4.0.0-alpha.
|
|
29
|
-
"tailwindcss": "4.0.0-alpha.
|
|
28
|
+
"@tailwindcss/oxide": "4.0.0-alpha.18",
|
|
29
|
+
"tailwindcss": "4.0.0-alpha.18"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^20.12.12",
|