Skip to content

Tailwind failing not compiling in production mode #256

Closed Answered by JoshReedSchramm
JoshReedSchramm asked this question in Q&A
Discussion options

You must be logged in to vote

answering my own post in case anyone runs into this in the future.

The issue was, i believe, a combination of two things.

  1. We needed to move all the postcss related packages out of devDependencies and into normal dependencies.
  2. We updated webpack.config.js to add the sass-loader. Our config now looks like this:
const { webpackConfig, merge } = require('shakapacker')
const sassLoaderConfig = {
  module: {
    rules: [
      {
        test: /\.s[ac]ss$/i,
        use: [
          "sass-loader",
        ],
      },
    ],
  },
};

const options = {
  resolve: {
    extensions: ['.mjs', '.js', '.sass', ".scss", ".css", ".module.sass", ".module.scss", ".module.css", ".png", ".svg", ".gif", ".j…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JoshReedSchramm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant