Skip to content

Commit c312e3c

Browse files
committed
[change] 複数のspritesが生成される時のための対応
1 parent 1e10c88 commit c312e3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ var getImportPrefix = require("./getImportPrefix");
1212
module.exports = function(content, map) {
1313
// ワークアラウンド
1414
// postcss-spritesに各コンポーネント用のsprite.pngを渡す方法がわからない
15-
if (content.match(/url\(client\/images\/sprite\.png\)/)) {
16-
content = content.replace(/url\(client\/images\/sprite\.png\)/g, 'url(../../images/sprite.png)');
15+
if (content.match(/url\(client\/images\/sprites/)) {
16+
content = content.replace(/url\(client\/images\/sprites\//g, 'url(../../images/sprites/');
1717
}
1818

1919
if(this.cacheable) this.cacheable();

0 commit comments

Comments
 (0)