<div dir="ltr">Hi Cristina,<div><br></div><div>In vtk.js we now use webpack2 (in master at least, you may have picked an older version though), and the webpack2 documentation states that you no longer need a loader for json:</div><div><br></div><div><a href="https://webpack.js.org/guides/migrating/#json-loader-is-not-required-anymore">https://webpack.js.org/guides/migrating/#json-loader-is-not-required-anymore</a><br></div><div><br></div><div>Is your project also using webpack2? In that case you shouldn't need the json loader. Also, when you refer to "Build-in modules of Node.js", does that refer specifically to this:</div><div><br></div><div><a href="https://github.com/sindresorhus/builtin-modules">https://github.com/sindresorhus/builtin-modules</a><br></div><div><br></div><div>or do you mean something else? </div><div><br></div><div>Cheers,</div><div>Scott</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 21, 2017 at 8:57 AM, Aron Helser <span dir="ltr"><<a href="mailto:aron.helser@kitware.com" target="_blank">aron.helser@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Cristina,<div>ParaViewWeb uses this webpack 1.x loader:</div><div><div>{</div><div> test: /\.json$/,</div><div> loader: 'json-loader',</div><div> },</div></div><div>That should allow you to 'include' a json file in your javascript, and then you might need to use the built-in JSON.parse() to turn it into an object. </div><div><br></div><div>Regards,</div><div>Aron</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Jul 21, 2017 at 4:43 AM, Cristina Oyarzun via vtkusers <span dir="ltr"><<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div>Dear all,<br><br></div>I visualized several actors using VTK-js. Now I want to read a .json file and according to the information that it is included there assign different colors to the actors. <br><br>Unfortunately as soon as I try to use the Build-in modules of Node.js I start getting errors. I didnt manage to find out how do I have to adapt the "webpack.config.js" (or the "package.json"?) so that it works. <br><br></div>I found somewhere in a forum that it should work by adding " target: 'node' " to the webpack.config.js but it didnt. Any help would be great!<br><br></div>Thank you!<span class="m_-4225013262831887081HOEnZb"><font color="#888888"><br></font></span></div><span class="m_-4225013262831887081HOEnZb"><font color="#888888">Cristina<br></font></span></div>
<br></div></div>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>