-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API - Using Preloaded Assets with the Compiler #141
Comments
From @sokra on March 13, 2015 13:44 You can provide a custom |
From @danschumann on March 16, 2015 17:29 Is it documented anywhere? Or, what structure does it need to be in? |
/content/concepts/loaders.md 校对
This section seems to be the only one that mentions it so far. Related discussion here as well: webpack/webpack#1562. It also seems to be somewhat related to the webpack/enhanced-resolve repository and the |
You can set the This should be an object with these methods:
|
@sokra so I do see the MyCompiler.plugin("environment", function(compiler) {
compiler.inputFileSystem = {
mkdirp(path, callback) { ... },
readFile(path, callback) { ... },
readdir(path, callback) { ... },
stat(path, callback) { ... }
}
}); or differently? Also it seems maybe we should recommend people use or at least take a look at the |
I recommend using |
Ok will do -- is that usage example I showed correct or incorrect though? |
Related: webpack/webpack#1562 |
Hmmm I found what looks like a good example here: christianalfoni/webpack-bin#106. |
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
):or, my loaded files look like this (
asObject: false
)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
The text was updated successfully, but these errors were encountered: