Skip to content

Instantly share code, notes, and snippets.

@MDSilviu
Last active January 7, 2020 06:43
Show Gist options
  • Save MDSilviu/166a066360e9013b77226cae9f42babf to your computer and use it in GitHub Desktop.
Save MDSilviu/166a066360e9013b77226cae9f42babf to your computer and use it in GitHub Desktop.
mini-css-extract-plugin moduleFilename bug
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
plugins: [
new MiniCssExtractPlugin({
moduleFilename: ({ name }) => `${name}.dsadas.css`
}),
],
entry: {
'scripts/theme': './theme/index.js'),
'scripts/admin': './admin/index.js'),
},
module: {
rules: [
{
test: /\.(css|scss)$/,
exclude: /node_modules/,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
sourceMap: true,
url: false,
},
},
{
loader: 'postcss-loader',
options: {
sourceMap: true,
},
},
{
loader: 'sass-loader',
options: {
sourceMap: true,
},
},
],
},
],
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment