Skip to content

Commit 0d3cdfd

Browse files
committed
use path from webpacker config instead hardcoded path
1 parent 38acbb0 commit 0d3cdfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/install/tailwindcss_with_webpacker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
directory Pathname.new(__dir__).join("stylesheets"), Webpacker.config.source_path.join("stylesheets")
1010
Dir.chdir(WEBPACK_STYLESHEETS_PATH) { run "npx tailwindcss init" }
1111

12-
insert_into_file "postcss.config.js", "require('tailwindcss')(\"./app/javascript/stylesheets/tailwind.config.js\"),\n ",
12+
insert_into_file "postcss.config.js", "require('tailwindcss')(\".#{WEBPACK_STYLESHEETS_PATH.sub(Rails.root.to_s, '')}/tailwind.config.js\"),\n ",
1313
before: "require('postcss-import')"
1414

1515

0 commit comments

Comments
 (0)