laravel-mix-purgecss | Zero-config Purgecss for Laravel Mix | Internationalization library

 by   spatie JavaScript Version: 6.0.0-beta.0 License: MIT

kandi X-RAY | laravel-mix-purgecss Summary

kandi X-RAY | laravel-mix-purgecss Summary

laravel-mix-purgecss is a JavaScript library typically used in Utilities, Internationalization applications. laravel-mix-purgecss has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can install using 'npm i laravel-mix-purgecss' or download it from GitHub, npm.

Zero-config Purgecss for Laravel Mix
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              laravel-mix-purgecss has a medium active ecosystem.
              It has 836 star(s) with 40 fork(s). There are 10 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 1 open issues and 61 have been closed. On average issues are closed in 90 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of laravel-mix-purgecss is 6.0.0-beta.0

            kandi-Quality Quality

              laravel-mix-purgecss has 0 bugs and 0 code smells.

            kandi-Security Security

              laravel-mix-purgecss has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              laravel-mix-purgecss code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              laravel-mix-purgecss is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              laravel-mix-purgecss releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions, examples and code snippets are available.
              It has 12 lines of code, 0 functions and 5 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of laravel-mix-purgecss
            Get all kandi verified functions for this library.

            laravel-mix-purgecss Key Features

            No Key Features are available at this moment for laravel-mix-purgecss.

            laravel-mix-purgecss Examples and Code Snippets

            Configuring postcss-uncss for Laravel Mix
            Lines of Code : 6dot img1License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            npm i laravel-mix-purgecss
            
            mix.js('resources/js/app.js', 'public/js')
               .sass('resources/sass/app.scss', 'public/css')
               .purgeCss({ enabled: true });
            
            Configuring postcss-uncss for Laravel Mix
            Lines of Code : 36dot img2License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            let mix = require('laravel-mix');
            
            const tailwindcss = require('tailwindcss');
            
            // Removes unused CSS
            // According to Discord chat: Running Purge CSS as part of Post CSS is a ton faster than laravel-mix-purgecss
            // But if that doesn't work

            Community Discussions

            QUESTION

            Tailwind 3 in Laravel gives: Error: PostCSS plugin tailwindcss requires PostCSS 8
            Asked 2021-Dec-10 at 09:46

            I am trying to upgrade tailwind to version 3 in my Laravel application.

            I followed the installation as instructed in

            https://tailwindcss.com/docs/upgrade-guide#upgrade-packages

            npm install -D tailwindcss@latest postcss@latest autoprefixer@latest

            This worked fine. But when I run npm run dev I get this error:

            ERROR in ./resources/assets/css/tailwindcore.css Module build failed (from ./node_modules/css-loader/index.js): ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js): Error: PostCSS plugin tailwindcss requires PostCSS 8.

            I have read from the docs that PostCSS 8 is now required with tailwind 3. However, PostCSS 8 has been installed. Why would I still receive this error? I also tried to remove node_modules folder and reinstall, but got same error.

            This is my package.json:

            ...

            ANSWER

            Answered 2021-Dec-10 at 09:46

            The issue is that you're running an old version of Laravel Mix. Another issue you will face is the @tailwindcss/form plugin will need to be updated as well.

            Update the packages with:

            Source https://stackoverflow.com/questions/70301843

            QUESTION

            Tailwind purge not rendering styles with PHP
            Asked 2021-Sep-15 at 14:34

            In a new WordPress project I'm using Tailwind CSS with ACF flexible (block) content.
            Now I've created a "spacer" block, that can be used in between other blocks.

            The thing is, Tailwind JIT is not purging the PHP file correctly. I works good if I echo out the full sting like "h-20" or "sm:h-40", but when I'm creating the string with some PHP filters, it won't work.

            For example:

            ...

            ANSWER

            Answered 2021-Sep-15 at 14:34

            I'm afraid purgeCSS does not run your code and cannot 'see' these classes. So it's not adding them to the CSS file.

            As per the Tailwind documentation on 'Writing purgeable HTML' here

            That means that it is important to avoid dynamically creating class strings in your templates with string concatenation, otherwise PurgeCSS won’t know to preserve those classes.

            Source https://stackoverflow.com/questions/69090192

            QUESTION

            Strange output when building Tailwind through PostCSS (Laravel Mix)
            Asked 2021-Jan-17 at 11:03

            I'm using Laravel Mix and PostCSS to build Tailwind.

            Everything works, I can even Purge unused styles.

            I have strange outputs when I build (a LOT of these) :

            ...

            ANSWER

            Answered 2021-Jan-15 at 18:41

            I'm not sure if that helps, but I will show you my config that seems to be working fine (using Sass), I removed some irrelevant parts.

            webpack.mix.js

            Source https://stackoverflow.com/questions/65736276

            QUESTION

            Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createContext is not a function
            Asked 2020-Dec-18 at 12:12

            I'm using @loadable/component in the following way:

            app.js

            ...

            ANSWER

            Answered 2020-Dec-18 at 12:12

            The reason you are getting this error is because one of your dependencies (or maybe even your code) relies on React.createContext method.

            This is part of the "context API" introduced in version 16.3 (changelog)

            You either have to remove the dependency that requires this later react version, or upgrade your react version to at least 16.3.

            Typically, when a dependency in your package.json depends on a specific version of react, it would list that version as a "peer dependency". If so, when running npm install you would receive a warning that looks like

            Source https://stackoverflow.com/questions/65356504

            QUESTION

            buefy@0.9.3 requires a peer of vue@^2.6.11 but none is installed
            Asked 2020-Oct-12 at 12:27

            I want to install the latest version of buefy in my project, which is 0.9.3. Currently I have installed 0.8.3

            If I run npm install -g buefy@latest I receive

            npm WARN buefy@0.9.3 requires a peer of vue@^2.6.11 but none is installed. You must install peer dependencies yourself.

            • buefy@0.9.3 updated 1 package in 0.511s

            However, Buefey 0.8.2 remains installed in package.json

            I also have difficulties to understand the error, because I have vue 2.6.12 installed.

            I tried to run (as explained in https://stackoverflow.com/a/58254678/2311074)

            ...

            ANSWER

            Answered 2020-Oct-12 at 12:27

            npm install -g means you're trying to install a package globally.

            Source https://stackoverflow.com/questions/64317817

            QUESTION

            Laravel mix scripts not watching changes
            Asked 2020-Aug-28 at 20:41

            Im using webpack to run a watch on .js files being changed, but I need to use wildcards instead of specific file names for my project. I'm currently using the commands below and it works fine and compiles all the expected files when I run npm run watch, but it will never run again after I make a change directly in any of the files. I have to stop watching and re-run the same command again and again. Is there something I am missing?

            ...

            ANSWER

            Answered 2020-Aug-28 at 20:41

            Edit your package.json file - change this:

            "watch": "npm run development -- --watch",

            To this:

            "watch": "node_modules/.bin/webpack --watch --watch-poll --config=node_modules/laravel-mix/setup/webpack.config.js",

            Source https://stackoverflow.com/questions/63640167

            QUESTION

            How to use purgeCss with Laravel Mix
            Asked 2020-Mar-11 at 09:58

            I’m trying to purge my css file with laravel-mix-purgecss. This is what i've done:

            • Installed it with NPM
            • Added .purgeCss() to my webpack.mix.js file
            • Added require(’laravel-mix-purgecss’); to my app.js

            But all I get when running npm run dev, it fails at:

            ...

            ANSWER

            Answered 2020-Mar-11 at 09:41

            Remove this line from app.js and add it to webpack.mix.js instead:

            Source https://stackoverflow.com/questions/60632893

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install laravel-mix-purgecss

            Before you get started, make sure you're using laravel-mix version 5.0.0 or higher.

            Support

            We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products. We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i laravel-mix-purgecss

          • CLONE
          • HTTPS

            https://github.com/spatie/laravel-mix-purgecss.git

          • CLI

            gh repo clone spatie/laravel-mix-purgecss

          • sshUrl

            git@github.com:spatie/laravel-mix-purgecss.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Internationalization Libraries

            formatjs

            by formatjs

            react-i18next

            by i18next

            version

            by sebastianbergmann

            globalize

            by globalizejs

            angular-translate

            by angular-translate

            Try Top Libraries by spatie

            laravel-permission

            by spatiePHP

            laravel-backup

            by spatiePHP

            browsershot

            by spatiePHP