We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08ec36a commit 53496a0Copy full SHA for 53496a0
index.js
@@ -36,7 +36,10 @@ const operator = {
36
37
getVarData (modulePath, webpackContext) {
38
return modulePath.reduce( (accumulator, currentPath) => {
39
- const moduleData = (currentPath.methodName)? require(path.join(webpackContext.context, currentPath.path))[currentPath.methodName] : require(path.join(webpackContext.context, currentPath.path));
+ const modulePath = path.join(webpackContext.context, currentPath.path);
40
+ delete require.cache[require.resolve(modulePath)];
41
+ const moduleData = (currentPath.methodName)? require(modulePath)[currentPath.methodName] : require(modulePath);
42
+ webpackContext.addDependency(modulePath)
43
return Object.assign(accumulator, moduleData);
44
}, {});
45
},
0 commit comments