@reshoot/macro
v2.1.6
Published
Babel macro integration for Reshoot
Downloads
20
Maintainers
Readme
@reshoot/macro
A babel-macro
transpiling reshoot('image.png', { color: '#eee' })
into import meta from 'image.png?color=#eee';
.
More about reshoot
.
Installation
# PNPM
pnpm add -D @reshoot/macro
# NPM
npm install -D @reshoot/macro
# yarn
yarn add -D @reshoot/macro
Setup
// babel.config.js
module.exports = {
// ...
plugins: ['babel-plugin-macros'],
};
API
import reshoot from '@reshoot/macro';
const meta = reshoot(
'./image.png',
{ color: '#eee' } // Optional inline config overriding the loader options
);
Support
This library has been continuously used in many of my personal projects, and is regarded as production-ready. In the foreseeable future, I will continuously maintain and support this library.
Issues and Feedback
Please voice your opinion and report bugs in the issues sections of this GitHub project.
Contributing
You are more than welcome to add more functionalities, improve documentation, fix bugs, and anything you think is needed. The build step is pretty self-explanatory. Please refer to package.json
.
License
MIT