$ npm install -D pkg-name
$ yarn add -D pkg-name
$ pnpm add -D pkg-name
Vite
// vite.config.ts
import PkgName from "pkg-name/vite";
export default defineConfig({
plugins: [
PkgName({
/* options */
}),
],
});
Rollup
// rollup.config.js
import PkgName from "pkg-name/rollup";
export default {
plugins: [
PkgName({
/* options */
}),
// other plugins
],
};
Webpack
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require("pkg-name/webpack")({
/* options */
}),
],
};
Rspack
// rspack.config.js
module.exports = {
/* ... */
plugins: [
require("pkg-name/rspack")({
/* options */
}),
],
};
Nuxt
// nuxt.config.ts
export default defineNuxtConfig({
modules: ["pkg-name/nuxt"],
pkgName: {
/* options */
},
});
Vue CLI
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require("pkg-name/webpack")({
/* options */
}),
],
},
};
Quasar
// 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
// esbuild.config.js
import { build } from "esbuild";
build({
/* ... */
plugins: [
require("pkg-name/esbuild")({
/* options */
}),
],
});
Astro
// astro.config.mjs
import PkgName from "pkg-name/astro";
export default defineConfig({
integrations: [
PkgName({
/* options */
}),
],
});
MIT. Made with ❤️ by Ray