vue-cli 创建的项目里怎么引入 bower_component 里的js文件

深淵寒魚
  • 61
import fileinput from '/bower_components/bootstrap-fileinput/js/fileinput.js'

错误提示如下:

This dependency was not found:

  • /bower_components/bootstrap-fileinput/js/fileinput.js in ./~/_babel-loader@6.4.1@babel-loader/lib!./~/_vue-loader@12.2.1@vue-loader/lib/selector.js?type=script&index=0!./src/components/category/import.vue

To install it, you can run: npm install --save /bower_components/bootstrap-fileinput/js/fileinput.js

评论
阅读 2.9k
1 个回答
✓ 已被采纳
撰写回答

登录后参与交流、获取后续更新提醒

宣传栏