javascript - How do I listen for webpack (watchpack) changes in --watch mode? -


i'm experimenting webpack , call function everytime webpack/watchpack detects changes when in --watch mode. watchpack api describes .on('change') method, how can hook running instance of watchpack?

executing this:

webpack --watch --colors --progress 

and here webpack.config.js:

var extracttextplugin = require('extract-text-webpack-plugin');  module.exports = {     entry: {         style: './styles/master.less',         homepage: './styles/homepage.less',         messaging: './styles/messaging.less',         places: './styles/places.less',         profile: './styles/profile.less',     },     output: {         filename: '_tmp/[name].js'     },     module: {         loaders: [             {                 test: /\.less$/,                 exclude: /node_modules/,                 loader: extracttextplugin.extract('raw!less')             }         ]     },     plugins: [         new extracttextplugin('_tmp/[name].css')     ] }; 

i've tried creating preloader, since loaders intended processing source code, it's not way go.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -