【问题标题】:How to deploy angular 4 apps on app engine without uploading 220MB of node_modules如何在应用引擎上部署 Angular 4 应用而不上传 220MB 的 node_modules
【发布时间】:2017-07-17 18:48:19
【问题描述】:

我想在谷歌云应用引擎上部署我的 Angular 4 应用程序,我想。

如果我在 node_modules 中有 220mb 的数据,我只想部署 dist 文件夹,而不是其他数据。过去我有单独的文件夹,当我使用 ng build --prod 构建应用程序时,我复制了 MAX 10mb 的 dist 文件夹,然后将文件夹移动到我拥有 express 的文件夹中,然后部署谷歌云中的应用程序有任何方法可以告诉谷歌云我想在云上上传哪些数据。 或者有类似 .gitignore 的东西忽略 node_modules 文件夹

【问题讨论】:

    标签: angular google-app-engine google-cloud-platform


    【解决方案1】:

    您是否考虑过在您的app.yaml 中使用skip_files

    skip_files:
    - node_modules/
    

    更多:https://cloud.google.com/appengine/docs/standard/python/config/appref#Python_app_yaml_Skipping_files

    【讨论】:

    • Thnx Brother MarkM
    • 请问我是否需要一直设置skip_files node_modules或没有必要
    猜你喜欢
    • 1970-01-01
    • 2016-09-15
    • 1970-01-01
    • 2011-12-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多