atomizer-plugins
v1.2.1
Published
Atomizer plugins for esbuild, Rollup, Vite and Webpack
Downloads
89
Maintainers
Readme
atomizer-plugins
Atomizer plugins for esbuild, Rollup, Vite and Webpack. This library leverages the unplugin unified plugin system.
Installation
npm i atomizer-plugins
Follow the usage section below depending on the library your project uses.
Usage
See the Options
definition for the available options that each plugin accepts.
You can find a running example of each plugin in the examples/
directory.
esbuild
// esbuild.config.js
import { build } from 'esbuild';
import { esbuild } from 'atomizer-plugins';
const atomizer = rollup({
/* options */
config: atomizerConfig,
});
build({
// ... esbuild config
plugins: [atomizer],
});
rollup
// rollup.config.js
import { rollup } from 'atomizer-plugins';
const atomizer = rollup({
/* options */
config: atomizerConfig,
});
export default {
// ... rollup config
plugins: [atomizer],
};
vite
// vite.config.ts
import { vite } from 'atomizer-plugins';
const atomizerPlugin = vite({
config: atomizerConfig,
});
export default defineConfig(() => {
return {
plugins: [atomizerPlugin],
};
});
webpack
// webpack.config.js
import { webpack } from 'atomizer-plugins';
const atomizer = webpack({
/* options */
config: atomizerConfig,
});
export default {
// ... webpack config
plugins: [atomizer],
};