Account created on 30 July 2019, about 5 years ago
#

Recent comments

Hello,

I had the same requirement today, after some research I managed to refresh the main.style.css adding serveStatic and rewriteRules to the current browserSync config:

mix.browserSync({
  proxy: proxy.proxy,  // remote/live site url
  files: [
    'build/js/**/*.js',
    'build/css/**/*.css',
    'build/components/**/*.css',
    'build/components/**/*.js',
    'src/**/*.twig',
    'templates/**/*.twig',
  ],
  stream: true,
  serveStatic: ['./build'],
  rewriteRules: [
    {
      match: new RegExp('/themes/custom/custom-theme-name/build/css/main.style.css'),
      fn: function () {
        return '/css/main.style.css';
      }
    }
  ]
});
Production build 0.71.5 2024