目的是将web组件放在某处的web
文件夹下,还是放在lib
文件夹下?
我问是因为我不确定,而且据我所知没有提到。
最佳答案
将你的组件放在lib目录下。
lib/
control1.html
control2.html
control3.html
假设您配置了 pubspec.yaml
文件并将包命名为“my_controls”。
name: my_controls
dependencies:
html5lib: '>=0.3.1+2'
web_ui: '>=0.3.2'
由于您的项目现在定义了一个包,您可以将 lib 目录中的文件引用为:
<link rel="components" href="packages/my_controls/control1.html">
<link rel="components" href="packages/my_controls/control2.html">
<link rel="components" href="packages/my_controls/control3.html">
关于dart - Web组件应该放在 "web"文件夹下吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14483755/