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 try to use handlebars in production with Express + Webpack and face some problems.
I use express' res.render to server-side render, and I'm not sure how to deal with bundling all my .hbs files.
I have a public folder which contains 'views', 'js', 'css' directories, and in views I have layouts and partials folders.
building with webpack bundles everything into a single js file that has nothing to do with handlebars templates in it..
should I manually copy views directory to dist/public ?
after building, I have a single bundle js file, and when I run it I receive an error 'failed to lookup view directory ...'obviously because I didn't manually copied all views directories to my dist folder... should I ? how should I handle it ? Just manually copy the .hbs files and folders to dist? Shouldn't handlebars-loader handle it somehow ?
Thanks.
The text was updated successfully, but these errors were encountered:
I try to use handlebars in production with Express + Webpack and face some problems.
I use express' res.render to server-side render, and I'm not sure how to deal with bundling all my .hbs files.
I have a public folder which contains 'views', 'js', 'css' directories, and in views I have layouts and partials folders.
building with webpack bundles everything into a single js file that has nothing to do with handlebars templates in it..
This is my webpack.config.js
after building, I have a single bundle js file, and when I run it I receive an error 'failed to lookup view directory ...'obviously because I didn't manually copied all views directories to my dist folder... should I ? how should I handle it ? Just manually copy the .hbs files and folders to dist? Shouldn't handlebars-loader handle it somehow ?
Thanks.
The text was updated successfully, but these errors were encountered: