Skip to content

Commit bef726c

Browse files
kirill-konshinUrthen
authored andcommitted
Update index.js
1 parent 1c8e615 commit bef726c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,20 @@ CaseSensitivePathsPlugin.prototype.apply = function (compiler) {
148148
if (realName) {
149149
if (realName === '!nonexistent') {
150150
// If file does not exist, let Webpack show a more appropriate error.
151-
done(null);
151+
if (data.createData) done(null); else done(null, data);
152152
} else {
153153
done(new Error(`[CaseSensitivePathsPlugin] \`${pathName}\` does not match the corresponding path on disk ${realName}`));
154154
}
155155
} else {
156-
done(null);
156+
if (data.createData) done(null); else done(null, data);
157157
}
158158
});
159159
};
160160

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

167167
checkFile(pathName, data, done);

0 commit comments

Comments
 (0)