Skip to content

Commit

Permalink
remove webpack not found dynamic fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Jan 17, 2019
1 parent c6a301e commit f792f4e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ module.exports = (
if (rebuildHandler)
rebuildHandler();
});
// override "not found" context to try built require first
compiler.hooks.compilation.tap("ncc", compilation => {
assetState.assetPermissions = Object.create(null);
/* compilation.cache.get('/NccPlugin/' + resolvedEntry, null, (err, _assetPermissions) => {
if (err) console.error(err);
assetState.assetPermissions = JSON.parse(_assetPermissions || 'null') || Object.create(null);
}); */
});

compiler.hooks.normalModuleFactory.tap("ncc", NormalModuleFactory => {
function handler(parser) {
Expand Down

0 comments on commit f792f4e

Please sign in to comment.