问题
Let's say I have a webpack configuration uses memory-fs as outputFileSystem and the target is node. And somewhere in the code I use require.ensure to split the code. In this case, when I try to require the module it tries to find the module in the disk and throws a "module not found error". What I want is, require to load split module from memory-fs as well. I couldn't find any appropriate loader or plugin fits this case. So, I will create my own. But I couldn't decide if I need a webpack plugin or a loader?
Thanks
来源:https://stackoverflow.com/questions/39506990/how-to-require-ensure-a-chunk-from-memory-fs-in-webpack