1

我正在使用 ExtJs 5.1。

我通过 app.json 向应用程序添加了一些外部库,只需使用“path”:“libPath”

一切正常,但是当我跑步时

sencha app build production

cmd 也尝试缩小外部库。如果被 Sencha 缩小,我的一些外部库会转到 Js Exception。

我怎么能说 sencha cmd 只构建和缩小 extjs 代码并复制外部库而不进行编辑?

如果我跑

sencha app build testing

一切正常。

非常感谢

4

2 回答 2

1

查看数组app.json周围的注释:js

    /**
 * List of all JavaScript assets in the right execution order.
 *
 * Each item is an object with the following format:
 *
 *      {
 *          // Path to file. If the file is local this must be a relative path from
 *          // this app.json file.
 *          //
 *          "path": "path/to/script.js",   // REQUIRED
 *
 *          // Set to true on one file to indicate that it should become the container
 *          // for the concatenated classes.
 *          //
 *          "bundle": false,    // OPTIONAL
 *
 *          // Set to true to include this file in the concatenated classes.
 *          //
 *          "includeInBundle": false,  // OPTIONAL
 *
 *          // Specify as true if this file is remote and should not be copied into the
 *          // build folder. Defaults to false for a local file which will be copied.
 *          //
 *          "remote": false,    // OPTIONAL
 *
 *          // If not specified, this file will only be loaded once, and cached inside
 *          // localStorage until this value is changed. You can specify:
 *          //
 *          //   - "delta" to enable over-the-air delta update for this file
 *          //   - "full" means full update will be made when this file changes
 *          //
 *          "update": "",        // OPTIONAL
 *
 *          // A value of true indicates that is a development mode only dependency.
 *          // These files will not be copied into the build directory or referenced
 *          // in the generate app.json manifest for the micro loader.
 *          //
 *          "bootstrap": false   // OPTIONAL
 *      }
 *
 */
"js": [
    {
        "path": "app.js",
        "bundle": true
    }
],

我想"includeInBundle" : false,可能会为你解决问题。

于 2015-06-04T20:58:09.340 回答
0

您是否将外部库放在应用程序的资源文件夹中?这通常只是按原样包含在内。

于 2017-01-17T19:04:01.547 回答