Sqip.macro
Webpack sqip-loader implemented as babel-plugin-macros
Install / Use
/learn @stereobooster/Sqip.macroREADME
sqip.macro
Webpack
sqip-loaderimplemented asbabel-plugin-macros
Usage
Similar to nodejs require call:
import sqip from "sqip.macro";
const preview = sqip("./image.jpg");
Example of usage in create-react-app
import coverImage from "./cover-image.jpg";
import sqip from "sqip.macro";
const coversqip = sqip("./cover-image.jpg");
const SomeComponent = () => (
<div
style={{
backgroundImage: `url(${coversqip}`,
backgroundSize: "cover",
backgroundRepeat: "no-repeat",
}}
>
<img src={coverImage} alt="" width="100%" height="100%" />
</div>
);
Credits
Based on pveyes/raw.macro.
License
MIT
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
