Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anthonygore/vue-cli-plugin-critical
https://github.com/anthonygore/vue-cli-plugin-critical
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/anthonygore/vue-cli-plugin-critical
- Owner: anthonygore
- Created: 2018-03-19T04:36:46.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-18T08:34:19.000Z (over 6 years ago)
- Last Synced: 2024-10-02T15:42:00.149Z (3 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 29
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Critical CSS Plugin for Vue CLI 3
Adds [html-critical-webpack-plugin](https://github.com/anthonygore/html-critical-webpack-plugin) to a Vue CLI project, which extracts [critical CSS](https://github.com/addyosmani/critical) and inlines it into the document head.
Any options which can be passed to HtmlCriticalPlugin can be passed to vue.config.js under the property `pluginOptions.critical` e.g.
```js
module.exports = {
pluginOptions: {
critical: {
width: 375,
height: 565
}
}
}
```#### Usage
```bash
npm i -D vue-cli-plugin-critical
npm run build ## Only runs in production mode
```