1
尝试从旧的体系结构移动到模块化世界,并使用npm与Three和Angular的posprocessing包。使用Angular导入模块内部的自定义文件
当从后处理它提供了以下错误导入模块:
Failed to compile.
./~/postprocessing/src/materials/adaptive-luminosity/glsl/shader.frag
Module parse failed: (...)/materials/adaptive-luminosity/glsl/shader.frag Unexpected token (1:8)
You may need an appropriate loader to handle this file type.
| uniform sampler2D tPreviousLum;
| uniform sampler2D tCurrentLum;
| uniform float minLuminance;
@ ./~/postprocessing/src/materials/adaptive-luminosity/index.js 3:0-42
@ ./~/postprocessing/src/materials/index.js
我认为它与角CLI设置的东西。 任何想法如何启用导入自定义文件扩展名?
进出口新的的WebPack,和排出后的角度的WebPack配置相当复杂。你能描述在哪个地方正确地插入装载器吗? – mjanisz1
在'loaders'下的webpack配置文件中,就像'glslify-loader'页面建议的一样。我会更新答案 –
这仍然只能通过弹出角度cli应用程序吗? – daniel