1.0.0 • Published 3 years ago
@brunnerh/snowpack-plugin-delegate v1.0.0
A Snowpack plugin which delegates everything to the plugin options, allowing for simple inline plugin definitions.
Install via:
npm install @brunnerh/snowpack-plugin-delegate --save-dev
Example usage:
// Replace a constant everywhere
const constantsPlugin = {
transform: options => options.contents.replace(/PORT/g, 3000),
};
const config = {
plugins: [
// ...
["@brunnerh/snowpack-plugin-delegate", constantsPlugin],
],
};
module.exports = config;
1.0.0
3 years ago