构建一定要在根目录进行吗?
我的目录结构是
ROOT //根目录
+ bohao_dest //开发环境
- index.html
- coolie.min-1.0.3.js
- coolie-config.js
- coolie.json
-
-
+ bohao //生存环境
index.html
<!doctype html>
<script
coolie src="./coolie.min-1.0.3.js"
data-config="./coolie-config.js"
data-main="./main.js"></script>
coolie.json
{
"js": {
"main": [
"./app/main.js"
],
"coolie-config.js": "./coolie-config.js",
"dest": "./js/",
"chunk": []
},
"css": {
"dest": "./css/",
"minify": {
"compatibility": "ie7"
}
},
"html": {
"src": [
"./*.html"
],
"minify": true
},
"resource": {
"dest": "./res/",
"minify": true
},
"copy": [],
"dest": {
"dirname": "../bohao/",
"host": "",
"versionLength": 32
}
}
构建之后的 index.html
<!doctype html><meta charset="utf8">
<script src="/coolie.min-1.0.3.js"
data-config="./coolie-config.eb5246af58c901e28f0fac5c232580f2.js"
data-main="./main.js"></script><!--coolie@0.21.23-->
显然coolie.min-1.0.3.js的目录出错了,因为bohao目录并非根目录。虽然只需修改html文件就能正常使用。 想问问是否只能默认根目录构建,还是我配置有问题
</>