https://github.com/stereobooster/sqip.macro
Webpack sqip-loader implemented as babel-plugin-macros
https://github.com/stereobooster/sqip.macro
Last synced: about 2 months ago
JSON representation
Webpack sqip-loader implemented as babel-plugin-macros
- Host: GitHub
- URL: https://github.com/stereobooster/sqip.macro
- Owner: stereobooster
- License: mit
- Created: 2018-05-20T18:21:22.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-05T05:52:24.000Z (almost 6 years ago)
- Last Synced: 2025-03-25T22:36:36.861Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 692 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sqip.macro
[](https://travis-ci.org/stereobooster/sqip.macro) [](https://github.com/kentcdodds/babel-plugin-macros)
> Webpack [`sqip-loader`](https://github.com/EmilTholin/sqip-loader) implemented as [`babel-plugin-macros`](https://github.com/kentcdodds/babel-plugin-macros)
## Usage
Similar to nodejs `require` call:
```js
import sqip from "sqip.macro";const preview = sqip("./image.jpg");
```### Example of usage in create-react-app
```js
import coverImage from "./cover-image.jpg";
import sqip from "sqip.macro";
const coversqip = sqip("./cover-image.jpg");const SomeComponent = () => (
![]()
);
```## Credits
Based on [pveyes/raw.macro](https://github.com/pveyes/raw.macro).
## License
MIT