Skip to content

Commit

Permalink
add theme path in tailwind content config
Browse files Browse the repository at this point in the history
  • Loading branch information
hkp22 committed Sep 3, 2022
1 parent d0b70e6 commit 0a8f5db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Presets/Vite/TailwindPreset.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions stubs/Presets/tailwind-stubs/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 0a8f5db

Please sign in to comment.