unplugin-parcel-css
v0.2.0
Published
@parcel/css plugin for vite/rollup/webpack
Downloads
3
Maintainers
Readme
unplugin-parcel-css
A Vite/webpack/Rollup/esbuild plugin with @parcel/css.
@parcel/css is
A CSS parser, transformer, and minifier written in Rust.
Usage
Vite
// vite.config.ts
import ParcelCSS from 'unplugin-parcel-css/vite';
export default defineConfig({
plugins: [
ParcelCSS({
/* options */
}),
],
});
Example: playground/
Rollup
// rollup.config.js
import ParcelCSS from 'unplugin-parcel-css/rollup';
export default {
plugins: [
ParcelCSS({
/* options */
}),
],
};
You should use with css bundler like rollup-plugin-css-only
.
Webpack
// webpack.config.js
module.exports = {
// ...
plugins: [
require('unplugin-parcel-css/webpack')({
/* options */
}),
],
};
You should use with css-loader
.
Next.js
module.exports = {
webpack: (config) => {
config.plugins.push(
require('unplugin-parcel-css/webpack')({
/* options */
})
);
return config;
},
};
Nuxt
// nuxt.config.js
export default {
buildModules: [
[
'unplugin-parcel-css/nuxt',
{
/* options */
},
],
],
};
This module works for both Nuxt 2 and Nuxt Vite
Vue CLI
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-parcel-css/webpack')({
/* options */
}),
],
},
};
Contribute
Welcome!
License
MIT