自从我安装聚合物cli后,我一直面临着问题。我无法在开发过程中提供组件。我必须编写自己的Node.js服务器,并使用重新映射的URL来处理组件。但是documentation page明确表明它已经用自己的工具完成了这项工作。
我做了什么
polymer init
polymer serve
聚合物版本: 0.18.0-pre.15
Ubuntu 16.04.2 LTS x64
polymer serve
info: Files in this directory are available under the following URLs
applications: http://127.0.0.1:8081
reusable components: http://127.0.0.1:8081/components/test-element/
localhost:8081
GET http://localhost:8081/webcomponentsjs/webcomponents-loader.js 404 (Not Found)
GET http://localhost:8081/iron-component-page/iron-component-page.html 404 (Not Found)
网址重定向到http://localhost:8081/home/user-name/project-root/test-element/
提供项目根目录中的索引页面。
GET http://localhost:8081/home/user-name/project-root/webcomponentsjs/webcomponents-loader.js
GET http://localhost:8081/home/user-name/project-root/iron-component-page/iron-component-page.html 404 (Not Found)