Grunt wiredep not wiring some bower components

爱⌒轻易说出口 提交于 2019-12-01 18:40:38

grunt-wiredep works in a very specific way. The dependencies should be listed in an array inside the main property in bower.josn like the example you mentioned from bootstrap.

The problem you are facing is probably those packages doesn't have a main property or it is using multiple files in a string not an array.

To fix that, you can always define an override for the packages main property likes the following ...

In your grunt file:

wiredep: {
    ...
    overrides: {
      'package-name': {
        'main': [
          'link-to-css-file.css',
          'link-to-js-file.js'
        ]
      },
    },
},
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!