2 parents 982416b + 95d36c1 commit 53d8341Copy full SHA for 53d8341
1 file changed
webpack.config.js
@@ -76,7 +76,7 @@ module.exports = {
76
// lifetime for assets while still delivering changes quickly.
77
oneOf: [
78
{
79
- // Images referenced in CSS files
+ // Assets referenced in CSS files
80
issuer: /\.(scss|css)$/,
81
loader: 'file-loader',
82
options: {
@@ -92,11 +92,15 @@ module.exports = {
92
},
93
94
95
- // Images referenced in HTML and JS files
+ // Assets referenced in HTML and JS files
96
97
98
name: '[name].[hash:7].[ext]',
99
outputPath: getImgOutputPath,
100
+ publicPath: function(url, resourcePath) {
101
+ const outputPath = getImgOutputPath(url, resourcePath);
102
+ return toPublicPath(outputPath);
103
+ },
104
105
106
],
0 commit comments