Created
April 12, 2022 19:50
Star
You must be signed in to star a gist
Make Storybook works with Laravel Jetstream, Inertia and TailwindCSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const path = require('path'); | |
| const tailwindcss = require('../tailwind.config'); | |
| module.exports = { | |
| "stories": [ | |
| "../stories/**/*.stories.mdx", | |
| "../stories/**/*.stories.@(js|jsx|ts|tsx)" | |
| ], | |
| "addons": [ | |
| "@storybook/addon-links", | |
| "@storybook/addon-essentials" | |
| ], | |
| "framework": "@storybook/vue3", | |
| "core": { | |
| "builder": "webpack5", | |
| }, | |
| "webpackFinal": async (config) => { | |
| config.module.rules.push({ | |
| test: /\.css$/, | |
| use: [ | |
| { | |
| loader: 'postcss-loader', | |
| options: { | |
| postcssOptions: { | |
| implementation: 'postcss', | |
| plugins: { | |
| tailwindcss, | |
| } | |
| }, | |
| }, | |
| }, | |
| ], | |
| include: path.resolve(__dirname, '../'), | |
| }); | |
| config.resolve = { | |
| ...config.resolve, | |
| alias: { | |
| ...config.resolve?.alias, | |
| '@': '../resources/js', | |
| } | |
| } | |
| return config; | |
| } | |
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import '../resources/css/app.css'; | |
| export const parameters = { | |
| actions: { argTypesRegex: "^on[A-Z].*" }, | |
| controls: { | |
| matchers: { | |
| color: /(background|color)$/i, | |
| date: /Date$/, | |
| }, | |
| }, | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment