Skip to content

Commit 2f4f46c

Browse files
committed
Merge branch 'release/1.0.13'
2 parents e6ba657 + 0474a9d commit 2f4f46c

File tree

13 files changed

+2043
-1707
lines changed

13 files changed

+2043
-1707
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## 1.0.13 - 2023.11.22
6+
### Changed
7+
* Switch over to using Node 20 and NPM 10 in the Dockerfile
8+
* Update to Vite `^5.0.0` and Vitest `^1.0.0-beta.5`
9+
10+
### Fix
11+
* Fix an issue where building with a project of `"type": "module"` would fail because conditional exports were not defined in `"exports"` ([#12](https://github.com/nystudio107/rollup-plugin-critical/issues/12))
12+
513
## 1.0.12 - 2022.12.12
614
### Fix
715
* Fix import of the now ESM-only `critical` package into the CJS build of `rollup-plugin-critical` ([#9](https://github.com/nystudio107/rollup-plugin-critical/issues/9))

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
ARG TAG=16-alpine
1+
ARG TAG=20-alpine
22
FROM nystudio107/node-dev-base:$TAG
33

44
WORKDIR /app/
55

6-
RUN npm install -g npm@^9.2.0
6+
RUN npm install -g npm@^10.0.0
77

88
CMD ["run build"]
99

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TAG?=16-alpine
1+
TAG?=20-alpine
22
CONTAINER?=$(shell basename $(CURDIR))
33
DOCKERRUN=docker container run \
44
--name ${CONTAINER} \
@@ -57,7 +57,7 @@ update: docker
5757
update
5858
npm: docker
5959
${DOCKERRUN} \
60-
$(filter-out $@,$(MAKECMDGOALS))
60+
$(filter-out $@,$(MAKECMDGOALS)) $(MAKEFLAGS)
6161
%:
6262
@:
6363
# ref: https://stackoverflow.com/questions/6273608/how-to-pass-argument-to-makefile-from-command-line

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.

0 commit comments

Comments
 (0)