Skip to content

Webpacker: Add tailwind.config.js #33

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

Merged
merged 1 commit into from
Feb 6, 2021
Merged

Conversation

dixpac
Copy link
Contributor

@dixpac dixpac commented Feb 4, 2021

During webpack installation generate tailwind.config.js.

This commit places that file inside stylesheets/ dir, and link to it
inside postcss.config.js.

This is the blank Tailwind confg file that one can extend
to bring its own esthetics.

During webpack installation generate `tailwind.config.js`.

This commit places that file inside `stylesheets/` dir, and link to it
inside `postcss.config.js`.

This is the blank Tailwind confg file that one can extend
to bring its own esthetics.
@dhh dhh merged commit 76a5fa3 into rails:main Feb 6, 2021
@ghiculescu
Copy link
Member

ghiculescu commented Feb 24, 2021

What do you think about enabling purging in this file? That way the webpacker behavior would match the asset pipeline behavior out of the box.

I think the change would just be this:

-  purge: [],
+  purge: {
+    enabled:  process.env.NODE_ENV === 'production',
+    content: ['./app/views/**/*.*', './app/helpers/**/*.*'],
+  },

But wouldn't mind someone sanity checking that.

@dixpac
Copy link
Contributor Author

dixpac commented Feb 24, 2021

@ghiculescu something like this #40 ?

@ghiculescu
Copy link
Member

@dixpac yes, that's great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants