Skip to content

Commit

Permalink
Remove require.ensure entirely (prebid#1816)
Browse files Browse the repository at this point in the history
  • Loading branch information
snapwich authored and matthewlane committed Nov 14, 2017
1 parent d3c2b02 commit 72df57e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions plugins/RequireEnsureWithoutJsonp.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,7 @@ function RequireEnsureWithoutJsonp() {}
RequireEnsureWithoutJsonp.prototype.apply = function(compiler) {
compiler.plugin('compilation', function(compilation) {
compilation.mainTemplate.plugin('require-ensure', function(_, chunk, hash) {
return (
`
if(installedChunks[chunkId] === 0)
return callback.call(null, __webpack_require__);
else
console.error('webpack chunk not found and jsonp disabled');
`
).trim();
return '';
});
});
};
Expand Down

0 comments on commit 72df57e

Please sign in to comment.