Skip to content

Commit

Permalink
fix(file-loader): in development, include original name of file in fi…
Browse files Browse the repository at this point in the history
…les loaded by file-loader

This makes debugging easier since it is easier to match up each file to its source.
  • Loading branch information
djcsdy committed Feb 15, 2019
1 parent 7532fe0 commit 91714b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ function WebpackConfig(project: WebpackConfig.Project): (env: any) => Configurat
use: {
loader: "file-loader",
options: {
name: "[sha256:hash:base64:8].[ext]"
name: mode === "development"
? "[path][name]-[sha256:hash:base64:8].[ext]"
: "[sha256:hash:base64:8].[ext]"
}
}
}
Expand Down

0 comments on commit 91714b0

Please sign in to comment.