How can I use the Bower component in Dart?

I found a good JS component that was installed with Bower.

I would like to know how I can import my component, and let it be served by Pub.

So far I have tried bower installit and it is loading at the root of my project in/bower_components

And then in mine index.htmlI tried:

<link rel="import" href="../bower_components/paper-date-picker/paper-date-picker.html">

but Pub will not load files (it seems like it cannot determine relative paths in Bower).

+4
source share
2 answers

By default, the pub serves the web folder as the root folder, so you cannot go deeper than root. The easiest way to get this to work is to link the bower_components folder to the web folder, such as the pub for the folder folder.

.. /bower_components href .

+1

../, , /bower_components/paper-date-picker/paper-date-picker.html , .

../bower_components/paper-date-picker/paper-date-picker-dialog.html

, .

0

Source: https://habr.com/ru/post/1589523/


All Articles