I am trying to include a view partial (inside the same folder) which has a .js extension this way:
<%- partial('somePartial.js') %>
And, I get this error: Cannot find module 'js'
The view engine is using the file extension to look for the module… Any idea if this possible? I want to keep the .js extension for syntax highlighting purposes (of course, I can just set-up my IDE to treat a file with extension *.js.ejs as a JS file, but I rather not do that).
you can use app.register() like this:
this will use .extension for rendering.