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
Add documentation on preLoaders and postLoaders #19
Comments
pre and post loaders are loaders ;) |
But usually a loader isn't called with the source, is it? |
It is. It's called with the content of the file which it should "load". Take a look at some of my loaders to see examples. |
You can imagine loaders as some kind of transformation applied to the file content before including it in the bundle. require("loaderA!loaderB!./file.txt");
// while compiling: (simplified)
var loaderA = require("loaderA");
var loaderB = require("loaderB");
addToBundle(loaderA(loaderB(readFile("./file.txt")))); pre/post loaders work the same but you just don't specify them in the require call. |
Ah ok. So I don't have to use |
No, you can and should use the parameter. Elsewise chaining of loader will not work correctly. |
Oops. I will adjust that. |
In the last issue you pointed out to use a postLoader like this:
Is the signature of pre- and postLoaders documented anywhere?
The text was updated successfully, but these errors were encountered: