Skip to content

Commit 234d97b

Browse files
author
David Heinemeier Hansson
committed
Fix adding the stylesheets by default
1 parent e4c8954 commit 234d97b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/install/tailwindcss_with_webpacker.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
LATEST_WEBPACKER = "\"@rails\/webpacker\": \"rails\/webpacker#b6c2180\","
22
WEBPACK_STYLESHEETS_PATH = "#{Webpacker.config.source_path}/stylesheets"
3+
APPLICATION_LAYOUT_PATH = Rails.root.join("app/views/layouts/application.html.erb")
34

45
# Current webpacker version relies on an older version of PostCSS
56
# which the latest TailwindCSS version is not compatible with
@@ -10,6 +11,6 @@
1011
insert_into_file "#{Webpacker.config.source_entry_path}/application.js", "\nrequire(\"stylesheets/application.scss\")\n"
1112

1213
say "Adding minimal configuration for Tailwind CSS to work properly"
13-
directory "stylesheets/application.scss", Webpacker.config.source_path
14+
directory Pathname.new(__dir__).join("stylesheets"), Webpacker.config.source_path.join("stylesheets")
1415

1516
insert_into_file "postcss.config.js", "require('tailwindcss'),\n\t", before: "require('postcss-import')"

0 commit comments

Comments
 (0)