1.0.0 • Published 3 years ago

@brunnerh/snowpack-plugin-delegate v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

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;