我不知道为什么polymer build
不会在没有出现任何错误的情况下创建bundled and unbundled
个文件夹。
info: Clearing build/ directory...
info: (default) Building...
info: (default) Build complete!
polymer.json
{
"entrypoint": "index.html",
"shell": "src/good-app.html",
"fragments": [
"src/good-home.html",
"src/good-list-item.html",
"src/good-data.html",
"src/lazy-resources.html"
],
"sourceGlobs": [
"src/**/*",
"data/**/*",
"images/**/*",
"bower.json"
],
"includeDependencies": [
"manifest.json",
"bower_components/webcomponentsjs/webcomponents-lite.min.js"
]
}
答案 0 :(得分:3)
从polymer-cli
v0.18开始,您可以将“builds”添加到polymer.json。
"builds": [{
"name": "bundled-es6",
"bundle": true,
"js": {"minify": true, "compile": false},
"css": {"minify": true},
"html": {"minify": true}
},{
"name": "unbundled-es5",
"bundle": false,
"js": {"minify": true, "compile": true},
"css": {"minify": true},
"html": {"minify": true}
}]
https://www.polymer-project.org/2.0/docs/tools/polymer-cli#build