You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I precompile templates with the command: handlebars -m -e html ./templates/ > ./templates/templates.js
Then I try to import the resulting file in my javascript: import './templates/templates.js';
Which throws an error: Uncaught ReferenceError: Handlebars is not defined
This error appears with either full or run-time only Handlebars included. I use Handlebars 4.0.5 and bundle a project with Webpack.
Can you help with this please?
The text was updated successfully, but these errors were encountered:
The precompiler does not create any module-code. If you are using webpack, you should probably consider using the handlebars-loader or something similar.
I precompile templates with the command:
handlebars -m -e html ./templates/ > ./templates/templates.js
Then I try to import the resulting file in my javascript:
import './templates/templates.js';
Which throws an error:
Uncaught ReferenceError: Handlebars is not defined
This error appears with either full or run-time only Handlebars included. I use Handlebars 4.0.5 and bundle a project with Webpack.
Can you help with this please?
The text was updated successfully, but these errors were encountered: