6
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

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

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

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
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
6
Help us understand the problem. What are the problem?