Skip to content

Commit

Permalink
Fix for #40
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-konshin authored and Urthen committed Jan 15, 2020
1 parent 517af98 commit 1c8e615
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Expand Up @@ -148,20 +148,20 @@ CaseSensitivePathsPlugin.prototype.apply = function (compiler) {
if (realName) {
if (realName === '!nonexistent') {
// If file does not exist, let Webpack show a more appropriate error.
done(null, data);
done(null);
} else {
done(new Error(`[CaseSensitivePathsPlugin] \`${pathName}\` does not match the corresponding path on disk ${realName}`));
}
} else {
done(null, data);
done(null);
}
});
};

const onAfterResolve = (data, done) => {
this.primeCache(() => {
// Trim ? off, since some loaders add that to the resource they're attemping to load
let pathName = data.resource.split('?')[0];
let pathName = data.createData.resource.split('?')[0];
pathName = pathName.normalize ? pathName.normalize('NFC') : pathName;

checkFile(pathName, data, done);
Expand Down

0 comments on commit 1c8e615

Please sign in to comment.