Relative Content

Tag Archive for webpackmini-css-extract-plugin

Webpack Generating Empty CSS Files when module exports array

I’m trying to export 2 different javascript code bundles to create a library. Each has different settings. I saw that I can pass an array to module.exports in webpack to achieve this. It works for the JS, however, the CSS files, when generated, are mostly blank except for a webpack generated comment. It also works correctly if I only pass one of the configs to the module.exports array like this:
module.exports = [configLib];
It just doesn’t work when I have two items in the array. Any ideas?

Webpack Generating Empty CSS Files when module exports array

I’m trying to export 2 different javascript code bundles to create a library. Each has different settings. I saw that I can pass an array to module.exports in webpack to achieve this. It works for the JS, however, the CSS files, when generated, are mostly blank except for a webpack generated comment. It also works correctly if I only pass one of the configs to the module.exports array like this:
module.exports = [configLib];
It just doesn’t work when I have two items in the array. Any ideas?

Webpack Generating Empty CSS Files when module exports array

I’m trying to export 2 different javascript code bundles to create a library. Each has different settings. I saw that I can pass an array to module.exports in webpack to achieve this. It works for the JS, however, the CSS files, when generated, are mostly blank except for a webpack generated comment. It also works correctly if I only pass one of the configs to the module.exports array like this:
module.exports = [configLib];
It just doesn’t work when I have two items in the array. Any ideas?

Webpack Generating Empty CSS Files when module exports array

I’m trying to export 2 different javascript code bundles to create a library. Each has different settings. I saw that I can pass an array to module.exports in webpack to achieve this. It works for the JS, however, the CSS files, when generated, are mostly blank except for a webpack generated comment. It also works correctly if I only pass one of the configs to the module.exports array like this:
module.exports = [configLib];
It just doesn’t work when I have two items in the array. Any ideas?

webpack ignores mini-css-extract-plugin plugins options

I’ve been trying to setup webpack for a personal project and everything has worked out well except that for some reason webpack is ignoring the options I’m giving it for production for mini-css-extract-plugin and is instead using the default filename of [hash][ext] when it should be using [name]-[hash].css . This is what I have in my webpack files.
webpack.common.js: