@tailwindcss/webpack 0.0.0-insiders.f302fce → 0.0.0-insiders.f3fdda2
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.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Q=Object.create;var L=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var G=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var x=(i,e)=>(e=Symbol[i])?e:Symbol.for("Symbol."+i),$=i=>{throw TypeError(i)};var K=(i,e,l,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of G(e))!q.call(i,c)&&c!==l&&L(i,c,{get:()=>e[c],enumerable:!(n=J(e,c))||n.enumerable});return i};var k=(i,e,l)=>(l=i!=null?Q(j(i)):{},K(e||!i||!i.__esModule?L(l,"default",{value:i,enumerable:!0}):l,i));var B=(i,e,l)=>{if(e!=null){typeof e!="object"&&typeof e!="function"&&$("Object expected");var n,c;l&&(n=e[x("asyncDispose")]),n===void 0&&(n=e[x("dispose")],l&&(c=n)),typeof n!="function"&&$("Object not disposable"),c&&(n=function(){try{c.call(this)}catch(u){return Promise.reject(u)}}),i.push([l,n,e])}else l&&i.push([l]);return e},D=(i,e,l)=>{var n=typeof SuppressedError=="function"?SuppressedError:function(d,g,t,m){return m=Error(t),m.name="SuppressedError",m.error=d,m.suppressed=g,m},c=d=>e=l?new n(d,e,"An error was suppressed during disposal"):(l=!0,d),u=d=>{for(;d=i.pop();)try{var g=d[1]&&d[1].call(d[2]);if(d[0])return Promise.resolve(g).then(u,t=>(c(t),u()))}catch(t){c(t)}if(l)throw e};return u()};var N=k(require("@alloc/quick-lru")),s=require("@tailwindcss/node"),T=require("@tailwindcss/node/require-cache"),A=require("@tailwindcss/oxide"),P=k(require("fs")),p=k(require("path"));var r=s.env.DEBUG,v=new N.default({maxSize:50});function F(i,e){return`${i}:${e.base??""}:${JSON.stringify(e.optimize)}`}function V(i,e){let l=F(i,e);if(v.has(l))return v.get(l);let n={mtimes:new Map,compiler:null,scanner:null,candidates:new Set,fullRebuildPaths:[]};return v.set(l,n),n}async function C(i){var m=[];try{let e=this.async();let l=this.getOptions()??{};let n=this.resourcePath;let c=this.resource;let u=l.base??process.cwd();let d=l.optimize??process.env.NODE_ENV==="production";let g=n.endsWith(".module.css");let t=B(m,new s.Instrumentation);r&&t.start(`[@tailwindcss/webpack] ${p.default.relative(u,n)}`);{if(r&&t.start("Quick bail check"),!/@(import|reference|theme|variant|config|plugin|apply|tailwind)\b/.test(i)){r&&t.end("Quick bail check"),r&&t.end(`[@tailwindcss/webpack] ${p.default.relative(u,n)}`),e(null,i);return}r&&t.end("Quick bail check")}try{let a=V(c,l),S=p.default.dirname(p.default.resolve(n)),R=a.compiler===null;async function E(){r&&t.start("Setup compiler"),a.fullRebuildPaths.length>0&&!R&&(0,T.clearRequireCache)(a.fullRebuildPaths),a.fullRebuildPaths=[],r&&t.start("Create compiler");let b=await(0,s.compile)(i,{from:n,base:S,shouldRewriteUrls:!0,onDependency:f=>a.fullRebuildPaths.push(f),polyfills:g?s.Polyfills.All^s.Polyfills.AtProperty:s.Polyfills.All});return r&&t.end("Create compiler"),r&&t.end("Setup compiler"),b}if(a.compiler??=await E(),a.compiler.features===s.Features.None){r&&t.end(`[@tailwindcss/webpack] ${p.default.relative(u,n)}`),e(null,i);return}let w="incremental";r&&t.start("Register full rebuild paths");{for(let f of a.fullRebuildPaths)this.addDependency(p.default.resolve(f));let b=[...a.fullRebuildPaths,n];for(let f of b){let o=null;try{o=P.default.statSync(f)?.mtimeMs??null}catch{}if(o===null){f===n&&(w="full");continue}a.mtimes.get(f)!==o&&(w="full",a.mtimes.set(f,o))}}r&&t.end("Register full rebuild paths"),w==="full"&&!R&&(a.compiler=await E());let h=a.compiler;if(!(h.features&(s.Features.AtApply|s.Features.JsPluginCompat|s.Features.ThemeFunction|s.Features.Utilities))){r&&t.end(`[@tailwindcss/webpack] ${p.default.relative(u,n)}`),e(null,i);return}if(a.scanner===null||w==="full"){r&&t.start("Setup scanner");let b=(h.root==="none"?[]:h.root===null?[{base:u,pattern:"**/*",negated:!1}]:[{...h.root,negated:!1}]).concat(h.sources);a.scanner=new A.Scanner({sources:b}),r&&t.end("Setup scanner")}if(h.features&s.Features.Utilities){r&&t.start("Scan for candidates");for(let o of a.scanner.scan())a.candidates.add(o);r&&t.end("Scan for candidates"),r&&t.start("Register dependency messages");let b=p.default.resolve(u,n);for(let o of a.scanner.files){let y=p.default.resolve(o);y!==b&&this.addDependency(y)}for(let o of a.scanner.globs)o.pattern[0]!=="!"&&(o.pattern==="*"&&u===o.base||this.addContextDependency(p.default.resolve(o.base)));let f=h.root;if(f!=="none"&&f!==null){let o=(0,s.normalizePath)(p.default.resolve(f.base,f.pattern));try{if(!P.default.statSync(o).isDirectory())throw new Error(`The path given to \`source(\u2026)\` must be a directory but got \`source(${o})\` instead.`)}catch(y){if(y.code!=="ENOENT")throw y}}r&&t.end("Register dependency messages")}r&&t.start("Build utilities");let z=h.build([...a.candidates]);r&&t.end("Build utilities");let O=z;d&&(r&&t.start("Optimization"),O=(0,s.optimize)(z,{minify:typeof d=="object"?d.minify:!0}).code,r&&t.end("Optimization")),r&&t.end(`[@tailwindcss/webpack] ${p.default.relative(u,n)}`),e(null,O)}catch(a){let S=F(c,l);v.delete(S),r&&t.end(`[@tailwindcss/webpack] ${p.default.relative(u,n)}`),e(a)}}catch(U){var I=U,M=!0}finally{D(m,I,M)}}module.exports=C;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var z=(r,t)=>(t=Symbol[r])?t:Symbol.for("Symbol."+r),O=r=>{throw TypeError(r)};var $=(r,t,a)=>{if(t!=null){typeof t!="object"&&typeof t!="function"&&O("Object expected");var i,p;a&&(i=t[z("asyncDispose")]),i===void 0&&(i=t[z("dispose")],a&&(p=i)),typeof i!="function"&&O("Object not disposable"),p&&(i=function(){try{p.call(this)}catch(o){return Promise.reject(o)}}),r.push([a,i,t])}else a&&r.push([a]);return t},x=(r,t,a)=>{var i=typeof SuppressedError=="function"?SuppressedError:function(c,g,e,f){return f=Error(e),f.name="SuppressedError",f.error=c,f.suppressed=g,f},p=c=>t=a?new i(c,t,"An error was suppressed during disposal"):(a=!0,c),o=c=>{for(;c=r.pop();)try{var g=c[1]&&c[1].call(c[2]);if(c[0])return Promise.resolve(g).then(o,e=>(p(e),o()))}catch(e){p(e)}if(a)throw t};return o()};import A from"@alloc/quick-lru";import{compile as F,env as U,Features as y,Instrumentation as I,normalizePath as M,optimize as Q,Polyfills as k}from"@tailwindcss/node";import{clearRequireCache as J}from"@tailwindcss/node/require-cache";import{Scanner as G}from"@tailwindcss/oxide";import B from"fs";import d from"path";var n=U.DEBUG,v=new A({maxSize:50});function D(r,t){return`${r}:${t.base??""}:${JSON.stringify(t.optimize)}`}function j(r,t){let a=D(r,t);if(v.has(a))return v.get(a);let i={mtimes:new Map,compiler:null,scanner:null,candidates:new Set,fullRebuildPaths:[]};return v.set(a,i),i}async function q(r){var f=[];try{let t=this.async();let a=this.getOptions()??{};let i=this.resourcePath;let p=this.resource;let o=a.base??process.cwd();let c=a.optimize??process.env.NODE_ENV==="production";let g=i.endsWith(".module.css");let e=$(f,new I);n&&e.start(`[@tailwindcss/webpack] ${d.relative(o,i)}`);{if(n&&e.start("Quick bail check"),!/@(import|reference|theme|variant|config|plugin|apply|tailwind)\b/.test(r)){n&&e.end("Quick bail check"),n&&e.end(`[@tailwindcss/webpack] ${d.relative(o,i)}`),t(null,r);return}n&&e.end("Quick bail check")}try{let l=j(p,a),S=d.dirname(d.resolve(i)),P=l.compiler===null;async function C(){n&&e.start("Setup compiler"),l.fullRebuildPaths.length>0&&!P&&J(l.fullRebuildPaths),l.fullRebuildPaths=[],n&&e.start("Create compiler");let h=await F(r,{from:i,base:S,shouldRewriteUrls:!0,onDependency:u=>l.fullRebuildPaths.push(u),polyfills:g?k.All^k.AtProperty:k.All});return n&&e.end("Create compiler"),n&&e.end("Setup compiler"),h}if(l.compiler??=await C(),l.compiler.features===y.None){n&&e.end(`[@tailwindcss/webpack] ${d.relative(o,i)}`),t(null,r);return}let w="incremental";n&&e.start("Register full rebuild paths");{for(let u of l.fullRebuildPaths)this.addDependency(d.resolve(u));let h=[...l.fullRebuildPaths,i];for(let u of h){let s=null;try{s=B.statSync(u)?.mtimeMs??null}catch{}if(s===null){u===i&&(w="full");continue}l.mtimes.get(u)!==s&&(w="full",l.mtimes.set(u,s))}}n&&e.end("Register full rebuild paths"),w==="full"&&!P&&(l.compiler=await C());let m=l.compiler;if(!(m.features&(y.AtApply|y.JsPluginCompat|y.ThemeFunction|y.Utilities))){n&&e.end(`[@tailwindcss/webpack] ${d.relative(o,i)}`),t(null,r);return}if(l.scanner===null||w==="full"){n&&e.start("Setup scanner");let h=(m.root==="none"?[]:m.root===null?[{base:o,pattern:"**/*",negated:!1}]:[{...m.root,negated:!1}]).concat(m.sources);l.scanner=new G({sources:h}),n&&e.end("Setup scanner")}if(m.features&y.Utilities){n&&e.start("Scan for candidates");for(let s of l.scanner.scan())l.candidates.add(s);n&&e.end("Scan for candidates"),n&&e.start("Register dependency messages");let h=d.resolve(o,i);for(let s of l.scanner.files){let b=d.resolve(s);b!==h&&this.addDependency(b)}for(let s of l.scanner.globs)s.pattern[0]!=="!"&&(s.pattern==="*"&&o===s.base||this.addContextDependency(d.resolve(s.base)));let u=m.root;if(u!=="none"&&u!==null){let s=M(d.resolve(u.base,u.pattern));try{if(!B.statSync(s).isDirectory())throw new Error(`The path given to \`source(\u2026)\` must be a directory but got \`source(${s})\` instead.`)}catch(b){if(b.code!=="ENOENT")throw b}}n&&e.end("Register dependency messages")}n&&e.start("Build utilities");let R=m.build([...l.candidates]);n&&e.end("Build utilities");let E=R;c&&(n&&e.start("Optimization"),E=Q(R,{minify:typeof c=="object"?c.minify:!0}).code,n&&e.end("Optimization")),n&&e.end(`[@tailwindcss/webpack] ${d.relative(o,i)}`),t(null,E)}catch(l){let S=D(p,a);v.delete(S),n&&e.end(`[@tailwindcss/webpack] ${d.relative(o,i)}`),t(l)}}catch(L){var N=L,T=!0}finally{x(f,N,T)}}export{q as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailwindcss/webpack",
|
|
3
|
-
"version": "0.0.0-insiders.
|
|
3
|
+
"version": "0.0.0-insiders.f3fdda2",
|
|
4
4
|
"description": "A webpack loader for Tailwind CSS v4.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"types": "./dist/index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@alloc/quick-lru": "^5.2.0",
|
|
31
|
-
"@tailwindcss/
|
|
32
|
-
"tailwindcss": "0.0.0-insiders.
|
|
33
|
-
"@tailwindcss/
|
|
31
|
+
"@tailwindcss/node": "0.0.0-insiders.f3fdda2",
|
|
32
|
+
"tailwindcss": "0.0.0-insiders.f3fdda2",
|
|
33
|
+
"@tailwindcss/oxide": "0.0.0-insiders.f3fdda2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^20.19.0",
|