Adds handlebar plugin to webpack build #1614
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is in reference to #1544. If we bring back the ability to access environment variables, we have two main benefits.
Easier Upgrade Path
Users upgrading to the webpack version will have less difficulty if they are already taking advantage of the handlebar template logic.
Environment Specific index.html
Users can take advantage of multiple environments. I believe these are examples of typical needs for environment specific logic.
Webpack Dev Server Base URL
Webpack Dev Server has an issue with baseURL: webpack/webpack-dev-server#288 By making this environment specific, users who need a nested directory structure for their SPA can use a baseURL of / for local testing using webpack dev server, but have a different value for production.
Build System Independent
There is actually a way to use variables from the HTML Plugin currently used in the form <%= htmlWebpackPlugin.options.title %>. However, this makes the templates build system specific. If you wanted to change away from Webpack later, these would not longer apply. By using handlebars, you can move between build systems.
This can also help address the following issues:
#1509
#1460
#1064