Skip to content

Commit f792f4e

Browse files
committed
remove webpack not found dynamic fallback
1 parent c6a301e commit f792f4e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/index.js

+8
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,14 @@ module.exports = (
172172
if (rebuildHandler)
173173
rebuildHandler();
174174
});
175+
// override "not found" context to try built require first
176+
compiler.hooks.compilation.tap("ncc", compilation => {
177+
assetState.assetPermissions = Object.create(null);
178+
/* compilation.cache.get('/NccPlugin/' + resolvedEntry, null, (err, _assetPermissions) => {
179+
if (err) console.error(err);
180+
assetState.assetPermissions = JSON.parse(_assetPermissions || 'null') || Object.create(null);
181+
}); */
182+
});
175183

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

0 commit comments

Comments
 (0)