Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions lib/install/stylesheets/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
module.exports = {
// Purge unused TailwindCSS styles
mode: 'jit',
purge: {
enabled: ["production"].includes(process.env.NODE_ENV),
content: [
'./**/*.html.erb',
'./**/*.scss',
'./app/helpers/**/*.rb',
'./app/javascript/**/*.js',
],
Expand Down
2 changes: 1 addition & 1 deletion lib/install/tailwindcss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
APPLICATION_LAYOUT_PATH = Rails.root.join("app/views/layouts/application.html.erb")

say "Installing Tailwind CSS"
run "yarn add tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9"
run "yarn add tailwindcss@latest postcss@latest autoprefixer@latest [email protected]"
insert_into_file "#{Webpacker.config.source_entry_path}/application.js", "\nimport \"stylesheets/application\"\n"

say "Configuring Tailwind CSS"
Expand Down