忽略Google App Engine Java Project中部署中的"node_modules"

Fiz*_*han 3 java google-app-engine node-modules

Google App Enginejava项目node modules用于用于构建前端的grunt任务.运行后grunt built,它会提供dist要部署的文件夹.

我们有以下文件夹结构

myproject
   src/
   war/
      app/
      dist/
      node_modules/
      Gruntfile.js
      WEB-INF/
Run Code Online (Sandbox Code Playgroud)

我们不想部署node-modules目录.我已添加以下内容appengine-web.xml

<static-files>
    <exclude path="/node_modules/*.*" />
</static-files>
Run Code Online (Sandbox Code Playgroud)

但它不起作用.如何从部署中排除它们?

dav*_*cv5 6

使用没有'.'的资源文件 为我工作.

    <resource-files>
        <exclude path="/node_modules/**" />
    </resource-files>
Run Code Online (Sandbox Code Playgroud)