openmct/.webpack/webpack.coverage.js
Jesse Mazzella cb4c59a464
fix(#7015): Generate source maps for generating code coverage metrics (#7582)
* fix(?): the robot says to do this...

* refactor: remove unused env var

---------

Co-authored-by: John Hill <john.c.hill@nasa.gov>
2024-03-12 17:02:41 -07:00

33 lines
684 B
JavaScript

/*
This file extends the webpack.dev.js config to add babel istanbul coverage.
OpenMCT Continuous Integration servers use this configuration to add code coverage
information to pull requests.
*/
import config from './webpack.dev.js';
config.devtool = 'source-map';
config.devServer.hot = false;
config.module.rules.push({
test: /\.js$/,
exclude: /(Spec\.js$)|(node_modules)/,
use: {
loader: 'babel-loader',
options: {
retainLines: true,
// eslint-disable-next-line no-undef
plugins: [
[
'babel-plugin-istanbul',
{
extension: ['.js', '.vue']
}
]
]
}
}
});
export default config;