Closed
Description
From @danschumann on March 11, 2015 14:0
I have all my files in memory, for various reasons I won't get into ( maybe one is because I wrote a loading module loaddir
and tend to use it ), but part of it is re-using code on the front end and back end.
My loaded files look like this (asObject: true
):
require('loaddir')({path: './scripts', asObject: true }).then(function(directory) {
/* directory == {
'file1': 'console.log("file1");',
'subDirectory': {
'file2': 'console.log("subDir/file2");',
},
} */
});
or, my loaded files look like this (asObject: false
)
require('loaddir')({path: './scripts' }).then(function(directory) {
/* directory == {
'file1': 'console.log("file1");',
'subDirectory/file2': 'console.log("subDir/file2");',
} */
});
How do I give a manifest like this to webpack, telling it "Hey webpack, I already loaded everything, can you just compile using this data plz?"
Copied from original issue: webpack/webpack#874