Skip to content

Laravel Mix

tanthammar edited this page May 4, 2021 · 9 revisions

Add support for nested css

You must add support for nested css, if you used the Artisan command to install Tall-forms, or if you installed the custom.css Otherwise, you won't be able to compile your css.

npm install postcss@latest autoprefixer@latest postcss-nesting alpinejs --save-dev

webpack.mix.js for Laravel 8 (css)

const mix = require('laravel-mix');
const cssNesting = require('postcss-nesting');

mix.js('resources/js/app.js', 'public/js')
    .postCss('resources/css/app.css', 'public/css', [
        require('postcss-import'),
        cssNesting(),
        require('tailwindcss'),
        // require('autoprefixer'), automatic w Laravel Mix 6
    ]);

if (mix.inProduction()) {
    mix.version();
}

Next step -> install the theme

Clone this wiki locally