feat: support static uri's with paths (#2399)

This commit is contained in:
Wyatt Johnson
2019-07-12 19:11:11 +00:00
committed by GitHub
parent 0b20542f05
commit b5b9cb7e2f
4 changed files with 13 additions and 11 deletions
+5
View File
@@ -499,6 +499,11 @@ export default function createWebpackConfig(
exclude: [/\.(js|ts|tsx)$/, /\.html$/, /\.json$/],
loader: require.resolve("file-loader"),
options: {
// Because the resources loaded via CSS can sometimes be loaded
// directly from a CSS file, this will ensure that they are
// relative to those referencing files.
publicPath: (loaderPublicPath: string) =>
"../../" + loaderPublicPath,
name: isProduction
? "assets/media/[name].[hash:8].[ext]"
: "assets/media/[name].[ext]",