webpack-cov.conf.js 499 B

123456789101112131415161718192021222324
  1. var path = require('path');
  2. module.exports = {
  3. entry: './test/build/index.js',
  4. output: {
  5. path: __dirname + "/build",
  6. filename: "coverage.js",
  7. publicPath: "./build/"
  8. },
  9. bail: true,
  10. module: {
  11. loaders: [
  12. { test: /\.css$/, loader: 'style-loader!css-loader' },
  13. ],
  14. preLoaders: [
  15. // instrument only testing sources with Istanbul
  16. {
  17. test: /\.js$/,
  18. include: path.resolve('lib/'),
  19. loader: 'istanbul-instrumenter'
  20. }
  21. ]
  22. }
  23. }