starter-unplugin

Starter template for Unplugin library

MIT License

Stars
5

pkg-name

📦 Installation

$ npm install -D pkg-name
$ yarn add -D pkg-name
$ pnpm add -D pkg-name

🚀 Usage

// vite.config.ts
import PkgName from "pkg-name/vite";

export default defineConfig({
	plugins: [
		PkgName({
			/* options */
		}),
	],
});
// rollup.config.js
import PkgName from "pkg-name/rollup";

export default {
	plugins: [
		PkgName({
			/* options */
		}),
		// other plugins
	],
};
// webpack.config.js
module.exports = {
	/* ... */
	plugins: [
		require("pkg-name/webpack")({
			/* options */
		}),
	],
};
// rspack.config.js
module.exports = {
	/* ... */
	plugins: [
		require("pkg-name/rspack")({
			/* options */
		}),
	],
};
// nuxt.config.ts
export default defineNuxtConfig({
	modules: ["pkg-name/nuxt"],
	pkgName: {
		/* options */
	},
});
// vue.config.js
module.exports = {
	configureWebpack: {
		plugins: [
			require("pkg-name/webpack")({
				/* options */
			}),
		],
	},
};
// quasar.conf.js [Vite]
module.exports = {
	vitePlugins: [
		[
			"pkg-name/vite",
			{
				/* options */
			},
		],
	],
};
// quasar.conf.js [Webpack]
const PkgNamePlugin = require("pkg-name/webpack");

module.exports = {
	build: {
		chainWebpack(chain) {
			chain.plugin("pkg-name").use(
				PkgNamePlugin({
					/* options */
				}),
			);
		},
	},
};
// esbuild.config.js
import { build } from "esbuild";

build({
	/* ... */
	plugins: [
		require("pkg-name/esbuild")({
			/* options */
		}),
	],
});
// astro.config.mjs
import PkgName from "pkg-name/astro";

export default defineConfig({
	integrations: [
		PkgName({
			/* options */
		}),
	],
});

📝 License

MIT. Made with ❤️ by Ray