File tree 1 file changed +3
-8
lines changed
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\","
2
1
WEBPACK_STYLESHEETS_PATH = "#{Webpacker.config.source_path}/stylesheets"
3
2
APPLICATION_LAYOUT_PATH = Rails.root.join("app/views/layouts/application.html.erb")
4
3
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", "\nrequire(\"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", "\nimport \"stylesheets/application\"\n"
12
7
13
8
say "Adding minimal configuration for Tailwind CSS to work properly"
14
9
directory Pathname.new(__dir__).join("stylesheets"), Webpacker.config.source_path.join("stylesheets")
You can’t perform that action at this time.
0 commit comments