当前在元素上运行 polymer build
时存在一个 Unresolved 错误:https://github.com/Polymer/polymer-cli/issues/338
有没有人有一些 Grunt 脚本(或描述它到底做了什么)来完成同样的事情?
最佳答案
问题出在元素默认导入上。 目录树应该是:
element/
bower_components/
build/
demo/
teste/
bower.json
element-test.html
index.html
READEME.md
index.html 和 elemt-test.html 上的导入调用“../dependency”,但正确的是调用“bower_components/dependency”,只要修复路径即可。
关于javascript - 如何构建 polymer 元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39293381/