mirror of https://github.com/webpack/webpack.git
39 lines
670 B
JavaScript
39 lines
670 B
JavaScript
const plugins = [
|
|
compiler => {
|
|
compiler.hooks.emit.tap("Test", compilation => {
|
|
for (const asset of compilation.getAssets()) {
|
|
const result = asset.source.sourceAndMap();
|
|
try {
|
|
expect(result.map).toBe(null);
|
|
} catch (_err) {
|
|
const err = /** @type {Error} */ (_err);
|
|
err.message += `\nfor asset ${asset.name}`;
|
|
throw err;
|
|
}
|
|
}
|
|
});
|
|
}
|
|
];
|
|
|
|
/** @type {import("../../../../").Configuration} */
|
|
module.exports = [
|
|
{
|
|
mode: "development",
|
|
devtool: false,
|
|
plugins
|
|
},
|
|
{
|
|
mode: "production",
|
|
devtool: false,
|
|
plugins
|
|
},
|
|
{
|
|
mode: "production",
|
|
devtool: false,
|
|
optimization: {
|
|
minimize: true
|
|
},
|
|
plugins
|
|
}
|
|
];
|