Ignore “node_modules” from deployment in Google App Engine Java Project

霸气de小男生 提交于 2019-12-22 10:46:57

问题


Google App Engine java project uses node modules for grunt tasks which is used to build the front end. After we run grunt built, it gives the dist folder to be deployed.

We have following folder structure

myproject
   src/
   war/
      app/
      dist/
      node_modules/
      Gruntfile.js
      WEB-INF/

We do not want to deploy node-modules directory. I have add following in appengine-web.xml

<static-files>
    <exclude path="/node_modules/*.*" />
</static-files>

But it DOES NOT work. How to exclude them from deployment?


回答1:


Using resource-files without '.' worked for me.

    <resource-files>
        <exclude path="/node_modules/**" />
    </resource-files>


来源:https://stackoverflow.com/questions/23083216/ignore-node-modules-from-deployment-in-google-app-engine-java-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!