Closed RainerAtSpirit closed 9 years ago
Figured it out. Just make sure to include the .html
files in files.
var wallabyWebpack = require('wallaby-webpack');
var webpackPostprocessor = wallabyWebpack({});
module.exports = function() {
return {
files: [
{pattern: 'src/**/*.js', load: false},
// Include .html files
{pattern: 'src/**/*.html', load: false},
{pattern: '!src/**/*Spec.js', load: false}
],
tests: [
{pattern: 'src/**/*Spec.js', load: false}
],
preprocessors: {
// '**/*.js': file => babel.transform(file.content, { sourceMap: true })
},
postprocessor: webpackPostprocessor,
bootstrap: function() {
window.__moduleBundler.loadTests();
}
};
};
Use case: all of our components are including html fragments via the raw-loader e.g.
In that situation wallaby throws an an error.
We are using the default configuration for webpack in wallaby.js, which works well for files that doesn't use the raw-loader.