Skip to content

Commit 0474a9d

Browse files
committed
chore: Updated dist build
1 parent e8e86cf commit 0474a9d

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed

dist/index.cjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"use strict";var C=Object.create;var s=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var w=(t,i)=>{for(var c in i)s(t,c,{get:i[c],enumerable:!0})},g=(t,i,c,r)=>{if(i&&typeof i=="object"||typeof i=="function")for(let a of d(i))!b.call(t,a)&&a!==c&&s(t,a,{get:()=>i[a],enumerable:!(r=P(i,a))||r.enumerable});return t};var u=(t,i,c)=>(c=t!=null?C(S(t)):{},g(i||!t||!t.__esModule?s(c,"default",{value:t,enumerable:!0}):c,t)),j=t=>g(s({},"__esModule",{value:!0}),t);var N={};w(N,{default:()=>k});module.exports=j(N);var m=u(require("path"),1),x="_critical.min.css",y={inline:!1,extract:!1,width:1200,height:1200,penthouse:{blockJSRequests:!1}};function B(t,i){return{name:"critical",async writeBundle(c,r){let a=[];for(let e of Object.values(r))if(e.type==="asset"&&e.fileName.endsWith(".css")){let l=m.join(c.dir||"",e.fileName);a.push(l)}if(a.length)for(let e of t.criticalPages){let l=t.criticalBase,o=t.criticalUrl+e.uri,f=t.criticalConfig&&t.criticalConfig.inline==!0?e.template+".html":e.template+x,h=Object.assign({css:a},y,{base:l,src:o,target:f},t.criticalConfig),p=(await import("critical")).generate;console.log(`Generating critical CSS from ${o} to ${f}`),await p(h,n=>{n&&console.error(n),i&&i(n)})}}}}var k=B;
2+
//# sourceMappingURL=index.cjs.map

dist/index.mjs.map renamed to dist/index.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.d.cts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Plugin } from 'rollup';
2+
3+
/**
4+
* [Vite.js](https://vitejs.dev/) & [Rollup](https://rollupjs.org/) plugin for generating critical CSS
5+
* that uses the [critical](https://github.com/addyosmani/critical) generator under the hood.
6+
*
7+
* @param {CriticalPluginConfig} pluginConfig - the plugin configuration object
8+
* @param {Function} callback - callback upon completion of the critical CSS generation
9+
* @constructor
10+
*/
11+
declare function PluginCritical(pluginConfig: CriticalPluginConfig, callback?: CriticalPluginCallback): Plugin;
12+
13+
export { PluginCritical as default };

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)