Ignore “node_modules” from deployment in Google Ap

2019-05-11 02:46发布

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条回答
放我归山
2楼-- · 2019-05-11 03:28

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

    <resource-files>
        <exclude path="/node_modules/**" />
    </resource-files>
查看更多
登录 后发表回答