Skip to content

Use path from webpacker config instead hardcoded path #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
use path from webpacker config instead hardcoded path
  • Loading branch information
Zhong-z committed Feb 9, 2021
commit 0d3cdfd3d836f1e1326b9afe33820b3ab9b18c7d
2 changes: 1 addition & 1 deletion lib/install/tailwindcss_with_webpacker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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')"


Expand Down