Skip to content

BrowserSync with MiniCssExtractPlugin and reload on inject changes from scss #88

Open
@saltnpixels

Description

@saltnpixels

I am using this plugin with the mini css extract plugin.
I am also using sass loader.

Even though I am using injectCss: true in the plugin options, it does a full reload because somehow i guess it is sensing changes to javascript files?

It works when i edit JUST a css file. However if I touch a .scss file it does a full reload.
Any advice?

reload: false does work, but then it wont reload for js files at all. :/

Code:

plugins: [
      new MiniCssExtractPlugin(),
      new BrowserSyncPlugin({
             host: themeConfig.server,
             proxy: themeConfig.server,
             https: true,
             files: [
                '**/*.php',
                '**/*.css',
             ],
             reloadDelay: 0
          }, { injectCss: true, } //make css load without reload
      ),
   ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions