忽略“node_modules”从部署在Google App Engine Java项目中 [英] Ignore "node_modules" from deployment in Google App Engine Java Project
问题描述
节点模块
来执行用于构建前端的grunt任务。运行 grunt built
后,它会给 dist
文件夹进行部署。
$
$ b
myproject
src /
war /
$ b 我们有以下文件夹结构$ b app /
dist /
node_modules /
Gruntfile.js
WEB-INF /
我们不想部署 node-modules
目录。我在 appengine-web.xml中添加以下内容
< static -files>
< exclude path =/ node_modules /*.*/>
< / static-files>
但它不起作用。如何将它们从部署中排除?
使用没有'。'的资源文件为我工作。
$ b
< resource-files>
< exclude path =/ node_modules / **/>
< / resource-files>
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?
Using resource-files without '.' worked for me.
<resource-files>
<exclude path="/node_modules/**" />
</resource-files>
这篇关于忽略“node_modules”从部署在Google App Engine Java项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!