【发布时间】:2015-02-15 17:07:53
【问题描述】:
我正在尝试构建我的 ExtJS 4.2 应用程序,并且我正在为 OSX 使用 Sencha Architect 3.1 和 Sencha CMD 5.1.1.39。
我正在关注this tutorial 如何从终端构建,正如预期的那样,我收到了这个错误:
com.sencha.exceptions.ExBuild: Mixed-Mode x-compile and microload markup is currently unsupported
通过搜索,我发现this thread from Sencha 正在讨论如何解决此错误。
我接下来要做的是从我的 app.json 文件中删除最初看起来像这样的行:
{
"name": "my_app_name",
"requires": [],
"id": "eceafdc4-45e6-4dc1-b51a-75af9b7887a6",
"resources": [
"resources/css/rowCSS.css",
"resources/css/receiptGrid.css",
"resources/css/propertyGrid.css",
"resources/css/msgBox.css",
"resources/css/popWindow.css",
"resources/css/passwordPrompt.css",
"resources/css/textStyles.css"
],
"theme": "ext-theme-classic-3ea6533d-fc56-477c-9143-5085a431c7f3",
"js": [
{
"path": "app.js",
"bundle": true
}
],
"css": [
{
"path": "bootstrap.css",
"bootstrap": true
}
]
}
并按照上面教程中的建议删除了“css”和“resources”部分。但是,我仍然有同样的错误。
我的index.html 文件如下所示:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>my_app_name</title>
<!-- <x-compile> -->
<!-- <x-bootstrap> -->
<script src="ext/ext-dev.js"></script>
<script src="bootstrap.js"></script>
<!-- </x-bootstrap> -->
<script src="app/override/form/Panel.js"></script>
<script type="text/javascript" src="app.js"></script>
<!-- </x-compile> -->
<link rel="stylesheet" href="bootstrap.css">
<link rel="stylesheet" href="resources/css/rowCSS.css" id="child-row">
<link rel="stylesheet" href="resources/css/receiptGrid.css" id="receiptGrid">
<link rel="stylesheet" href="resources/css/propertyGrid.css" id="propertyGrid">
<link rel="stylesheet" href="resources/css/msgBox.css" id="msgBox">
<link rel="stylesheet" href="resources/css/popWindow.css" id="popWindow">
<link rel="stylesheet" href="resources/css/passwordPrompt.css" id="passwordPrompt">
<link rel="stylesheet" href="resources/css/textStyles.css" id="textStyles">
</head>
<body>
</body>
</html>
在阅读 Sencha 网站上的帖子时,我似乎不得不选择 app.json 和 index.html 文件。所以我尝试删除“资源”和“css”,首先是内容,然后是整个内容,并尝试构建它但无济于事。我仍然收到错误。
我真的傻眼了,我正在尝试构建和发布我的 Web 应用程序,这样用户就不必加载大量的 ExtJS 脚本,其中很大一部分无论如何都没有用。
我也很困惑,因为index.html 和app.json(以及app.js 和app.json.meta)似乎都是由 Sencha Architect 3.1 自动生成的。 IDE 生成的文件在构建和发布过程中稍后似乎会发生冲突是没有意义的。
另外,煎茶线已经有 8 年历史了。除了那里提供的提示之外,我不知道如何解决这个问题。接下来我可以尝试什么?
【问题讨论】:
-
你的索引文件是什么样子的,可以发一下吗?
标签: extjs extjs4 extjs4.2 sencha-architect sencha-cmd