thelounge/webpack.config-test.js

23 lines
584 B
JavaScript
Raw Normal View History

"use strict";
const config = require("./webpack.config.js");
config.target = "node";
2018-09-04 20:18:17 +00:00
config.devtool = "eval";
// Add the istanbul plugin to babel-loader options
for (const rule of config.module.rules) {
if (rule.use.loader === "babel-loader") {
rule.use.options.plugins = [
"istanbul",
];
}
}
2018-01-25 18:32:28 +00:00
// `optimization.splitChunks` is incompatible with a `target` of `node`. See:
// - https://github.com/zinserjan/mocha-webpack/issues/84
// - https://github.com/webpack/webpack/issues/6727#issuecomment-372589122
config.optimization.splitChunks = false;
module.exports = config;