This is my config:
var glob = require('glob'); var EX = require('extract-text-webpack-plugin'); var entryFiles = []; var sassFiles = glob.sync(__dirname + '/src/static/sass/**/*.scss'); entryFiles = entryFiles.concat(sassFiles); module.exports = { entry:entryFiles, output: { path: __dirname + "/dist", filename: '[name].css' }, module: { rules: [{ test: /\.scss$/, use:EX.extract({ publicPath:__dirname + '/dist/static/css', //publicPath fallback:"style-loader", use:[ 'css-loader', 'sass-loader' ] }) }] }, plugins:[ new EX({ filename:'[name].css', allChunks:true }) ] }
there are two sass files a.scss and b.scss in the specified folder,but the budle result has only one file name of main.css and it is the combile of the two files.
This is my config:
var glob = require('glob'); var EX = require('extract-text-webpack-plugin'); var entryFiles = []; var sassFiles = glob.sync(__dirname + '/src/static/sass/**/*.scss'); entryFiles = entryFiles.concat(sassFiles); module.exports = { entry:entryFiles, output: { path: __dirname + "/dist", filename: '[name].css' }, module: { rules: [{ test: /\.scss$/, use:EX.extract({ publicPath:__dirname + '/dist/static/css', //publicPath fallback:"style-loader", use:[ 'css-loader', 'sass-loader' ] }) }] }, plugins:[ new EX({ filename:'[name].css', allChunks:true }) ] }
there are two sass files a.scss and b.scss in the specified folder,but the budle result has only one file name of main.css and it is the combile of the two files.