Closed lk77 closed 3 years ago
Was this not an issue?
no it was not, an issue on my end
i have done that to enforce my webpack config :
const webpackConfig = require('./webpack.config.test.js')
let DefaultWebpackOptionsFactory = require('karma-webpack/lib/webpack/defaults');
DefaultWebpackOptionsFactory.create = () => {
return webpackConfig;
};
require.cache[require.resolve('karma-webpack/lib/webpack/defaults')].exports = DefaultWebpackOptionsFactory;
it's a little dirty but it's the only way i found to make my webpack config works (multiple entry with multiple outputs)
but i needed to change the karma config
webpack: {}
if not when merging plugins, they were included twice
Expected Behavior
Plugins are only included once
Actual Behavior
Plugins are included twice due to issue when merging webpack config
Code
webpack config :
webpack config after merging (this.webpackOptions)
How Do We Reproduce?
Add a plugin in your webpack config and see that this plugin is added twice
thanks