nuxt-purgecss | A neat PurgeCSS wrapper for Nuxt.js | Frontend Framework library
kandi X-RAY | nuxt-purgecss Summary
kandi X-RAY | nuxt-purgecss Summary
Drop superfluous CSS! A neat PurgeCSS wrapper for Nuxt.js
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Purge module .
nuxt-purgecss Key Features
nuxt-purgecss Examples and Code Snippets
Community Discussions
Trending Discussions on nuxt-purgecss
QUESTION
ANSWER
Answered 2021-Apr-02 at 13:26All the plugins are loaded before the Vue instance is ever created and available globally. One solution would be to load any of those packages in specific components rather than on a global level if you don't need them everywhere.
Not sure what can be optimized beyond this.
Also, from this page: https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-plugins
ssr: false will be adapted to mode: 'client' and deprecated in next major release
So, you should not have any ssr
in your plugins
array.
QUESTION
I'm trying to deploy my nuxt app with serverless but get the error "Cannot find module 'nuxt-purgecss'".
Any idea what could be the fix?
Below my nuxt.config.js
...ANSWER
Answered 2020-May-11 at 22:17Just needed to move nuxt-purgecss from my devDependencies to my dependencies since it is needed for the build.
QUESTION
I am trying to generate a static website out of my (minimal) code with Nuxt. In that code, I integrate in particular the tailwindcss
toolkit as well as vue2-leaflet
. Upon
ANSWER
Answered 2020-Jan-14 at 22:11You are using nuxt-purgecss
which is using purgecss to strip unused CSS.
purgecss
do scan HTML (or vue) files for CSS classes in use and then strip unused classes from final CSS bundle.
You can take a look at default purgecss
configuration used by nuxt-purgecss
here. The paths
lists the paths purgecss
will scan for CSS usage.
Because you are not using most of the leaflet
css directly (in your components), its is necessary to configure purgecss
to don't remove leaflet's css.
You can do that by whitelisting (btw not sure if "comment" method will work in Vue\Nuxt)
You can read more here and here
Not tested!!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nuxt-purgecss
Add nuxt-purgecss dependency to your project
Add nuxt-purgecss to the buildModules section of nuxt.config.js
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page