jacobhq / blog

My blog based on the starter template for Learn Next.js
https://blog.jacobhq.xyz
MIT License
1 stars 0 forks source link

posts/storybook-tailwind #1

Open utterances-bot opened 3 years ago

utterances-bot commented 3 years ago

Create a production-ready storybook with tailwind - Blog | JacobHQ

Learn how to build a personal website using Next.js

https://blog.jacobhq.xyz/posts/storybook-tailwind

jacobhq commented 3 years ago

Commenting works ;). @jacobhq me if it's urgent.

moracabanas commented 3 years ago

Thanks you for this! mix.webpack.js contains PostCSS webpack config. Do you know how I can load this into storybook so I can work on a component on storybook? With your approach I must use postcss on script so every change need to stop storybook and recompile and hot reloading won't work. Any ideas?🤔

moracabanas commented 3 years ago

Nevermind this is working as intended!!

moracabanas commented 3 years ago

I just found you need the following postcss.config.js with the same mix.webpack.js for laravel jetstream inertia stack. So create the postcss.config.js file with this content:

module.exports = {
    plugins: {
        tailwindcss: {},
        'postcss-import': {},
    },
}