节点npm – 在前端引用three.js模块
我目前正在使用节点npm来pipe理前端的jQuery的依赖关系。 使用以下方法。
服务器(工作)
app.use('/jquery', express.static(__dirname + '/node_modules/jquery/dist/'));
客户(工作)
<script src="/jquery/jquery.js"></script>
这工作,但我希望能够从服务器端pipe理依赖项“three.js”。 就像是…
服务器(不工作)
app.use('/three', express.static(__dirname + '/node_modules/three/dist/'));
客户端(不工作)
<script src="/three/three.js"></script>
错误()
服务器未能加载状态为404的服务器(未find)
我怎样才能findnpm模块的目录结构?
在three.js项目中,构build的文件位于build
目录中,而不是dist
。
在服务器上,这应该工作:
app.use('/three', express.static(__dirname + '/node_modules/three/build/'));
- AJAX到PHP不使用NODEJS发送数据到数据库
- 为什么我无法成功运行哟angular?
- 尝试运行简单的hello world的.js输出时,得到“无法设置属性undefined的错误”clojurescript
- 使用HtmlPlugin从一个子目录为webpack构build资源
- 当你在Javascript中“从someModule导入someModuleName”会发生什么?
- 与date(2015-01-01)不同的date('2015-1-1')输出
- 通过nodejs重新附加到产生的进程
- 未被捕获的exception与qunit和jquery
- 如何使用OpenLayers和react-starter-kit?