Closed ItzNotABug closed 3 months ago
A view engine can support multiple file types, example -
.hbs
.html
.js
.jsx
.tsx
Current implementations requires adding an engine for each extension which can be repetitive, this PR addresses that issue.
Previously -
express.engine('js', jsx.engine); express.engine('jsx', jsx.engine); express.engine('tsx', jsx.engine);
New Approach -
express.engine(['js', 'jsx', 'tsx'], jsx.engine);
A view engine can support multiple file types, example -
.hbs
&.html
files.js
,.jsx
&.tsx
filesCurrent implementations requires adding an engine for each extension which can be repetitive, this PR addresses that issue.
Previously -
New Approach -