You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
526 B

  1. const MiniCssExtractPlugin = require('mini-css-extract-plugin');
  2. const { env } = require('../configuration.js');
  3. module.exports = {
  4. test: /\.s?css$/i,
  5. use: [
  6. MiniCssExtractPlugin.loader,
  7. {
  8. loader: 'css-loader',
  9. options: {
  10. minimize: env.NODE_ENV === 'production',
  11. },
  12. },
  13. {
  14. loader: 'postcss-loader',
  15. options: {
  16. sourceMap: true,
  17. },
  18. },
  19. {
  20. loader: 'sass-loader',
  21. options: {
  22. includePaths: ['app/javascript'],
  23. },
  24. },
  25. ],
  26. };