-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete InterpolateHtmlPlugin.js? #4202
Comments
Thanks @jantimon - i will look into this! |
@jantimon I tried to follow the src and read the docs but I cant get it working.
Which is the correct way to access %FOO% in the template? |
The replacement is done by the template language (by default that's lodash). new HtmlWebpackPlugin({
inject: true,
templateParameters: {
"FOO": 'BAR',
},
template: paths.appHtml,
}), <h1><%= FOO =></h1> Just like you used it before: If you want to use a %XXXX% syntax you have to use a loader which works that way. |
You can use any loader with any loader config (whatever would be possible in webpack is also possible for the plugin)
|
But you can also keep 2 template systems like it is implemented right now. |
Okay if I get it right we need to switch from |
html-webpack-plugin 3.1.0 allows to overwrite the template variables:
jantimon/html-webpack-plugin#904
The change allows libraries like create-react-app and vue-cli to overwrite template variables.
Please let me know if this allows you to replace InterpolateHtmlPlugin
The text was updated successfully, but these errors were encountered: