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
Automatic preferation of .web.js-files doesn't work #11
Comments
Same thing when using the command line. |
require('./bla')
|
If you want to enforce resolve: {
postprocess: {
normal: [
function(filename, cb) {
var file = filename.split("!").pop();
if(!/\.js$/.test(file)) return callback(null, filename);
file = file.replace(/\.js$/, ".web.js");
fs.exists(file, function(exists) {
if(!exists) return callback(null, filename);
return callback(null, filename.replace(/\.js$/, ".web.js"));
});
}
]
}
} |
Thanks, What exactly is a postprocessor in webpack? Is this ability documented? |
Sorry, now I've read the next issue #7. |
I'm not quite sure if I'm doing it wrong, but webpack uses the
.js
-file instead of the browser-compatible.web.js
. This is my test setup:bla.js
andbla.web.js
are in the same folder. The error occurs on linux and windows. My current webpack version is0.4.12
. Any idea? :)The text was updated successfully, but these errors were encountered: