We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f0f955 commit b46ce72Copy full SHA for b46ce72
package/rules/file.js
@@ -1,4 +1,4 @@
1
-const { join } = require('path')
+const { join, normalize } = require('path')
2
const { source_path: sourcePath, static_assets_extensions: fileExtensions } = require('../config')
3
4
module.exports = {
@@ -8,7 +8,7 @@ module.exports = {
8
loader: 'file-loader',
9
options: {
10
name(file) {
11
- if (file.includes(sourcePath)) {
+ if (file.includes(normalize(sourcePath))) {
12
return 'media/[path][name]-[hash].[ext]'
13
}
14
return 'media/[folder]/[name]-[hash:8].[ext]'
0 commit comments