Skip to content

Commit

Permalink
Merge pull request #14128 from webpack/test/mini-css
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Sep 3, 2021
2 parents 41e3136 + 45f6570 commit 2f287a4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
findBundle: function(i, options) {
return ["a.js", "b.js", "c.js"];
findBundle: function (i, options) {
return [`${i}_a.js`, `${i}_b.js`, `${i}_c.js`];
}
};
17 changes: 12 additions & 5 deletions test/configCases/plugins/mini-css-extract-plugin/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
var MCEP = require("mini-css-extract-plugin");

/** @type {import("../../../../").Configuration} */
module.exports = {
/** @type {(number, any) => import("../../../../").Configuration} */
const config = (i, options) => ({
entry: {
a: "./a",
b: "./b",
c: "./c.css",
x: "./x" // also imports chunk but with different exports
},
output: {
filename: "[name].js"
filename: `${i}_[name].js`
},
module: {
rules: [
Expand All @@ -27,7 +27,7 @@ module.exports = {
__dirname: false
},
plugins: [
new MCEP(),
new MCEP(options),
compiler => {
compiler.hooks.done.tap("Test", stats => {
const chunkIds = stats
Expand All @@ -47,4 +47,11 @@ module.exports = {
});
}
]
};
});

module.exports = [
config(0),
config(1, {
experimentalUseImportModule: true
})
];

0 comments on commit 2f287a4

Please sign in to comment.