diff --git a/lib/install/tailwindcss_with_webpacker.rb b/lib/install/tailwindcss_with_webpacker.rb index b80c637f..6f52f372 100644 --- a/lib/install/tailwindcss_with_webpacker.rb +++ b/lib/install/tailwindcss_with_webpacker.rb @@ -9,7 +9,7 @@ directory Pathname.new(__dir__).join("stylesheets"), Webpacker.config.source_path.join("stylesheets") Dir.chdir(WEBPACK_STYLESHEETS_PATH) { run "npx tailwindcss init" } -insert_into_file "postcss.config.js", "require('tailwindcss')(\"./app/javascript/stylesheets/tailwind.config.js\"),\n ", +insert_into_file "postcss.config.js", "require('tailwindcss')(\".#{WEBPACK_STYLESHEETS_PATH.sub(Rails.root.to_s, '')}/tailwind.config.js\"),\n ", before: "require('postcss-import')"