Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/vituum/vite-plugin-juice

⚡🧃 Vite plugin for Juice, inlines css into HTML
https://github.com/vituum/vite-plugin-juice

Last synced: about 1 month ago
JSON representation

⚡🧃 Vite plugin for Juice, inlines css into HTML

Lists

README

        

npm package
node compatility

# ⚡️🧃 ViteJuice

Inlines CSS code to HTML via [Juice](https://github.com/Automattic/juice). It's handy for creating email templates.

```js
import juice from '@vituum/vite-plugin-juice'

export default {
plugins: [
juice({
paths: [],
tables: true,
postcss: {},
doctype: '',
options: {},
juiceLink: async href => href
})
]
}
```

Only PostCSS and CSS is supported, you can transform sass or less via `juiceLink()` function. And process it manually.

* Sass - https://sass-lang.com/documentation/js-api/
* Less - https://lesscss.org/usage/#programmatic-usage

```html

```

Read the [docs](https://vituum.dev/plugins/juice.html) to learn more about the plugin options.

### Requirements

- [Node.js LTS (16.x)](https://nodejs.org/en/download/)
- [Vite](https://vitejs.dev/)