Webpack - prevent hot reloading for specific file

Viewed 867

I use webpack with webpack-dev-server. Here is webpack.config.js

When I change any file then my project is recompiling and it is a great feature. But I have a problem with local db. When some data is inserted to db then project is recompiling and this is not desired work.

I try plugin https://github.com/christophercliff/watch-ignore-webpack-plugin with config:

new WatchIgnorePlugin([
        path.resolve(__dirname, 'src'),
    ]),

And this only works. It ignore watching all files in src folder. But I want only ignore watching files from src/data-access directory. So when I try change 'src' to 'src/data-access' then again all my files was watched include src/data-access.

0 Answers
Related