
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
preact-cli-plugin-critical-css
Advanced tools
Preact CLI plugin for adding critical css to your pre-rendered routes
Preact CLI plugin that adds critical css to your pre-rendered routes using html-critical-webpack-plugin.
Install via npm:
npm i -D preact-cli-plugin-critical-css
or yarn:
yarn add preact-cli-plugin-critical-css --dev
then include it in your project by creating a preact.config.js
file:
import criticalCssPlugin from "preact-cli-plugin-critical-css";
export default (config, env) => {
const options = {
// Passed directly to the 'critical' module (this is optional)
};
criticalCssPlugin(config, env, options);
};
The plugin sets some default options which can be overridden:
const defaultOptions = {
// Inline the generated critical-path CSS.
inline: true,
// Minify critical-path CSS when inlining.
minify: true,
// Extract inlined styles from referenced stylesheets.
extract: false,
// Viewport width
width: 1280,
// Viewport height.
height: 600,
// Your build directory to find css files.
base: path.resolve(env.dest),
// The path to a prerendered route. (e.g. index.html)
src: filePath,
// Write the generated critical-path CSS to this file.
dest: filePath
};
Full list of possible options that are passed to critical are available here.
MIT © matthewlynch
FAQs
Preact CLI plugin for adding critical css to your pre-rendered routes
The npm package preact-cli-plugin-critical-css receives a total of 7 weekly downloads. As such, preact-cli-plugin-critical-css popularity was classified as not popular.
We found that preact-cli-plugin-critical-css demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.