From 0a8f5db850d846de4e176953b9c31fabc40f26db Mon Sep 17 00:00:00 2001 From: Harish Kumar Date: Sun, 4 Sep 2022 02:56:46 +0530 Subject: [PATCH] add theme path in tailwind content config --- src/Presets/Vite/TailwindPreset.php | 5 +++++ stubs/Presets/tailwind-stubs/tailwind.config.js | 1 + 2 files changed, 6 insertions(+) diff --git a/src/Presets/Vite/TailwindPreset.php b/src/Presets/Vite/TailwindPreset.php index 7b8c896..2d3402e 100644 --- a/src/Presets/Vite/TailwindPreset.php +++ b/src/Presets/Vite/TailwindPreset.php @@ -44,6 +44,11 @@ protected function exportBootstrapping() $this->ensureDirectoryExists($this->themePath('css')); copy($this->stubPath('tailwind-stubs/tailwind.config.js'), $this->themePath('tailwind.config.js')); + $this->replaceInFile( + '%theme_path%', + $this->relativeThemePath($this->getTheme()), + $this->themePath('tailwind.config.js') + ); if (! $this->exists($this->themePath('js/app.js'))) { copy( diff --git a/stubs/Presets/tailwind-stubs/tailwind.config.js b/stubs/Presets/tailwind-stubs/tailwind.config.js index a5bccf0..fb6a3b9 100644 --- a/stubs/Presets/tailwind-stubs/tailwind.config.js +++ b/stubs/Presets/tailwind-stubs/tailwind.config.js @@ -5,6 +5,7 @@ module.exports = { "./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php", "./storage/framework/views/*.php", "./resources/views/**/*.blade.php", + "./%theme_path%/**/*.{blade.php,js,vue,ts}", ], theme: {