https://github.com/ssssota/unplugin-parcel-css
A Vite/webpack/Rollup plugin with @parcel/css
https://github.com/ssssota/unplugin-parcel-css
parcel-css rollup-plugin vite-plugin webpack-plugin
Last synced: about 2 months ago
JSON representation
A Vite/webpack/Rollup plugin with @parcel/css
- Host: GitHub
- URL: https://github.com/ssssota/unplugin-parcel-css
- Owner: ssssota
- License: mit
- Created: 2022-06-12T14:38:06.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-04T01:41:27.000Z (almost 3 years ago)
- Last Synced: 2025-03-10T03:14:47.969Z (3 months ago)
- Topics: parcel-css, rollup-plugin, vite-plugin, webpack-plugin
- Language: TypeScript
- Homepage: https://www.npmjs.com/unplugin-parcel-css
- Size: 321 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# unplugin-parcel-css
[](https://www.npmjs.com/package/unplugin-parcel-css)
A Vite/webpack/Rollup/esbuild plugin with
[@parcel/css](https://github.com/parcel-bundler/parcel-css).@parcel/css is
> A CSS parser, transformer, and minifier written in Rust.
## Usage
### Vite
```ts
// vite.config.ts
import ParcelCSS from 'unplugin-parcel-css/vite';
export default defineConfig({
plugins: [
ParcelCSS({
/* options */
}),
],
});
```Example: [`playground/`](./playground/)
### Rollup
```ts
// 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
```ts
// webpack.config.js
module.exports = {
// ...
plugins: [
require('unplugin-parcel-css/webpack')({
/* options */
}),
],
};
```You should use with `css-loader`.
### Next.js
```ts
module.exports = {
webpack: (config) => {
config.plugins.push(
require('unplugin-parcel-css/webpack')({
/* options */
})
);
return config;
},
};
```### Nuxt
```ts
// nuxt.config.js
export default {
buildModules: [
[
'unplugin-parcel-css/nuxt',
{
/* options */
},
],
],
};
```> This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite)
### Vue CLI
```ts
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('unplugin-parcel-css/webpack')({
/* options */
}),
],
},
};
```## Contribute
Welcome!
## License
MIT