编译提示:忽略上传文件:runtime.js,怎么办?
发布于 6 年前 作者 yan60 534 次浏览 来自 问答

编译提示:忽略上传文件:runtime.js。可是这个文件不上传,手机上运行!有什么办法可以强制上传这个文件。

2 回复

看下项目的文件结构,以及 project.config.json 的内容呢

找到相关文档:忽略上传的文件:在项目文件夹下,某些文件可能不是小程序运行所需的,例如 readme 文档、.gitignore 文件等。为了优化大小,在预览和上传的过程中,这些文件将不会被打包。

可是runtime.js是必须的呀! 不明白,跟文件结构以及 project.config.json有啥关系,请明示。。。要了命了,谁能帮忙解决一下。谢谢!project.config.json

{

  “description”: “项目配置文件”,

  “miniprogramRoot”: “miniprogram/”,

  “cloudfunctionRoot”: “cloudfunctions/”,

  “packOptions”: {

    “ignore”: []

  },

  “setting”: {

    “urlCheck”: true,

    “es6”: true,

    “postcss”: true,

    “minified”: true,

    “newFeature”: true,

    “nodeModules”: true,

    “autoAudits”: false,

    “uglifyFileName”: true

  },

  “compileType”: “miniprogram”,

  “libVersion”: “2.4.0”,

  “appid”: “wx349b995d8703a278”,

  “projectname”: “%E7%A7%9F%E8%B5%81%E5%B0%8F%E5%BA%97”,

  “debugOptions”: {

    “hidedInDevtools”: []

  },

  “isGameTourist”: false,

  “scripts”: {

    “beforeCompile”: “”,

    “beforePreview”: “”,

    “beforeUpload”: “”

  },

  “condition”: {

    “search”: {

      “current”: -1,

      “list”: []

    },

    “conversation”: {

      “current”: -1,

      “list”: []

    },

    “game”: {

      “currentL”: -1,

      “list”: []

    },

    “miniprogram”: {

      “current”: -1,

      “list”: []

    }

  }

}

回到顶部