File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 1- LATEST_WEBPACKER = "\" @rails\/ webpacker\" : \" rails\/ webpacker#b6c2180\" ,"
21WEBPACK_STYLESHEETS_PATH = "#{ Webpacker . config . source_path } /stylesheets"
32APPLICATION_LAYOUT_PATH = Rails . root . join ( "app/views/layouts/application.html.erb" )
43
5- # Current webpacker version relies on an older version of PostCSS
6- # which the latest TailwindCSS version is not compatible with
7- gsub_file ( "package.json" , /\" @rails\/ webpacker\" .*/ ) { |matched_line | matched_line = LATEST_WEBPACKER }
8-
9- say "Adding latest Tailwind CSS and postCSS"
10- run "yarn add tailwindcss@latest postcss@latest autoprefixer@latest"
11- insert_into_file "#{ Webpacker . config . source_entry_path } /application.js" , "\n require(\" stylesheets/application.scss\" )\n "
4+ say "Installing Tailwind CSS"
5+ run "yarn add tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9"
6+ insert_into_file "#{ Webpacker . config . source_entry_path } /application.js" , "\n import \" stylesheets/application\" \n "
127
138say "Adding minimal configuration for Tailwind CSS to work properly"
149directory Pathname . new ( __dir__ ) . join ( "stylesheets" ) , Webpacker . config . source_path . join ( "stylesheets" )
You can’t perform that action at this time.
0 commit comments