Skip to content

Commit

Permalink
fix(index): migrate to loaders.enforce
Browse files Browse the repository at this point in the history
  • Loading branch information
niieani committed Oct 29, 2016
1 parent 5641d3f commit 417e2a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ export = function istanbul({include = undefined, exclude = undefined}:{include?,
return function istanbul(this: WebpackConfigWithMetadata): WebpackConfigWithMetadata {
return {
module: {
postLoaders: get(this, 'module.postLoaders', []).concat([{
loaders: get(this, 'module.loaders', []).concat([{
test: /\.(js|ts)$/,
loader: 'sourcemap-istanbul-instrumenter',
query: {
'force-sourcemap': true
},
enforce: 'post',
include: include || this.metadata.src,
exclude: exclude || (this.metadata.root ? [path.join(this.metadata.root, 'node_modules')] : []),
}])
Expand Down

0 comments on commit 417e2a9

Please sign in to comment.