javascript - stylelint-webpack-plugin not watching scss files -
i have webpack config i'm using process , lint js , scss.
var path = require('path'); var webpack = require('webpack'); var commonschunkplugin = require('webpack/lib/optimize/commonschunkplugin'); var extracttextplugin = require('extract-text-webpack-plugin'); var stylelintplugin = require('stylelint-webpack-plugin'); var postcssloader = require('postcss-loader'); var sassloaders = [ 'css-loader', 'postcss-loader', 'sass-loader' ] module.exports = { devtool: 'cheap-source-map', entry: { global: "./src" }, output: { path: path.join(__dirname, "dist"), filename: "[name].bundle.js", chunkfilename: "[id].chunk.js" }, module: { rules: [ { test: /\.js/, loaders: ['babel-loader', 'eslint-loader'], exclude: /node_modules/ }, { test: /\.scss/, loader: extracttextplugin.extract({fallback: 'style-loader', use: sassloaders.join('!')}) } ] }, plugins: [ new extracttextplugin("[name].css"), new commonschunkplugin({ filename: "common.js", name: "global" }), new stylelintplugin({ context: "src", configfile: '.stylelintrc', files: '**/*.scss', failonerror: false, quiet: false, syntax: 'scss' }), new webpack.loaderoptionsplugin({ options: { postcss: [] } }) ], resolve: { modules: [ path.join(__dirname, './src') ], extensions: ['.js', '.scss', '.css'] } } in src folder have index.js , styles.scss.
running webpack lints index.js , styles.scss files. however, running webpack --watch re-lints when change js file. not seem watching styles.scss file updates.
is there need doing make webpack watch work scss files well?
Comments
Post a Comment