プロジェクトに twitter-bootstrap を含めようとしていますが、glyphicons-halflings
画像は同じディレクトリ ( assets/css/
) でのみ動作し、Chrome でのみ動作します (Firefox と Opera では動作しません)。一部を含む (ファイル 'app.less'):
@import 'twitter-bootstrap/bootstrap';
@iconSpritePath: "/img/glyphicons-halflings.png";
@iconWhiteSpritePath: "/img/glyphicons-halflings-white.png";
さまざまなオプションを使用しようとしました: /img.. 、 img/.. 、 /../img 、 /gly...、 public dir に配置します (ちなみに images フォルダーから使用したい)、しかし、それは機能していません。おそらく、connect-assets でこのオプションを設定できます。このフォルダの写真。
app.less ファイルのみをプロジェクトに含める!= css('app')
この場合、Chrome で動作します。
アップデート:
http://localhost:3000/css/../img/glyphicons-halflings.png
Chrome では URL が常にに変換されhttp://localhost:3000/img/glyphicons-halflings.png
、Firefox では常に../img/glyphicons-halflings.png
( background-image: url("../img/glyphicons-halflings.png");
) がロードできないことがわかります。@iconSpritePath の私の定義はまったく機能しません。