karma-runner / karma-runner/karma
Autowatch not working with karma-webpack on karma version 4.0
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
* Operating System: Linux Mint
* Node Version: 10.15.1
* NPM Version: 6.4.1
* webpack Version: 3.6.0
* karma-webpack Version: 3.0.5
### Expected Behavior
Webpack rebuild bundle on file change when karma-webpack is used with Karma 4.0
### Actual Behavior
Nothing happens, Karma notice file change, but test bundle don't change
### Code
```js
// Part of my karma.conf.js
module.exports = function (config) {
config.set({
frameworks: ['mocha'],
files: [{
pattern: 'test/**/*.spec.js'
}],
preprocessors: {
'test/**/*.spec.js': ['webpack', 'sourcemap']
},
webpack: {
// ...
module: {
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: path.join(__dirname, 'node_modules')
},
{
test: /\.vue$/,
loader: 'vue-loader'
}
]
}
},
// ...
})
}
```
### How Do We Reproduce?
My karma config watches on files placed inside `test` folder. When I save change in folder, webpack doesn't get changes and test run on old files
https://github.com/karma-runner/karma/issues/3226 - Seems to be connected with this issue.
### Fix
Downgrade Karma to 3.1.4 version fixed the problem.
Contributor guide
Assessment
This issue has not been assessed yet.