2017-05-07 68 views
2

我不知道爲什麼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" 
    ] 
} 
+1

你使用哪種版本'聚合物cli'的?在新版本'0.18'中,您需要添加一些像'--bundle'這樣的屬性來爲文件創建捆綁文件夾,因爲默認情況下它只會創建一個'default'文件夾。嘗試通過輸入'聚合物幫助建立' – Dmitry

回答

3

polymer-cli v0.18開始,你可以加上 「建立」 以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

+0

迷人的....列出所有可靠的選項!謝謝。 – ppshein