All Projects → anthonygore → vue-cli-plugin-critical

anthonygore / vue-cli-plugin-critical

Licence: other
No description, website, or topics provided.

Programming Languages

javascript
184084 projects - #8 most used programming language

Critical CSS Plugin for Vue CLI 3

Adds html-critical-webpack-plugin to a Vue CLI project, which extracts critical CSS 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.

module.exports = {
    pluginOptions: {
        critical: {
            width: 375,
            height: 565    
        }
    }
}

Usage

npm i -D vue-cli-plugin-critical
npm run build ## Only runs in production mode
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].