7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

exportsOverrideでライブラリ名のディレクトリ直下にファイルを配置する

Posted at

微妙に不思議な挙動なのでメモ。

exportsOverrideを設定する際、ライブラリ名のディレクトリ直下にファイルを配置したい場合、ディレクトリ名を空にする必要がある。

bower.json
{
  "name": "dummy",
  "devDependencies": {
    "font-awesome":  "*"
  },
  "exportsOverride": {
    "font-awesome": {
      "": [
        "**/*.eot",
        "**/*.svg",
        "**/*.ttf",
        "**/*.woff"
      ]
    }
  }
}

上記のように設定すると、ディレクトリ構造は以下のようになる。

font-awesome/
    font-awesome.eot
    font-awesome.svg
    font-awesome.ttf
    font-awesome.woff
7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?