DEV Community

Discussion on: Setting up TailwindCSS in Laravel project

Collapse
 
nokibrokes profile image
Ariful Mowla

i tried this way. But it's only generating app.js file instead of app.css!

Collapse
 
cathzchen profile image
Catherine Chen • Edited

Try the code below in your webpack.config.js and let me know if it works.

mix.css('resources/css/app.css', 'public/css')   // replace with sass if using sass
    .options({
        processCssUrls: false,
        postCss: [ tailwindcss() ],
    })
    .js('resources/js/app.js', 'public/js');    // remove if you don't need js
Collapse
 
nokibrokes profile image
Ariful Mowla • Edited

It seems like my nodejs problem. It's working on another PC.
in my PC: dev-to-uploads.s3.amazonaws.com/i/...
another PC with the same config with version: dev-to-uploads.s3.amazonaws.com/i/...

Thread Thread
 
cathzchen profile image
Catherine Chen

Ahh, okay! That's really strange. I'm glad you figured it out, though!