sqip.macro
Webpack
sqip-loader
implemented asbabel-plugin-macros
Usage
Similar to nodejs require
call:
; const preview = ;
Example of usage in create-react-app
;;const coversqip = ; const SomeComponent = <div style= backgroundImage: `url(` backgroundSize: "cover" backgroundRepeat: "no-repeat" > <img src=coverImage alt="" width="100%" height="100%" /> </div>;
Credits
Based on pveyes/raw.macro.
License
MIT