Skip to content

InterpolateHtmlPlugin lodash template bug #13358

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

Open
Emiya0306 opened this issue Sep 6, 2023 · 0 comments
Open

InterpolateHtmlPlugin lodash template bug #13358

Emiya0306 opened this issue Sep 6, 2023 · 0 comments

Comments

@Emiya0306
Copy link

Emiya0306 commented Sep 6, 2023

Describe the bug

According to this commit, InterpolateHtmlPlugin will replace %MY_VARIABLE% after lodash template excuted.

It will cause this problem that if I write <%= 'REACT_APP_VARIABLE_1' === 'TEST' %> and set "REACT_APP_VARIABLE_1=TEST", you can see the result is false.

It is strange, I think it is a bug.

Reproducible demo

https://github.com/Emiya0306/interpolate-html-plugin-bug-report
https://github.com/Emiya0306/interpolate-html-plugin-bug-report/blob/master/public/index.html

@Emiya0306 Emiya0306 changed the title [InterpolateHtmlPlugin] beforeEmit change to afterTemplateExecution cause lodash template wrong. [InterpolateHtmlPlugin] beforeEmit change to afterTemplateExecution cause lodash template bug. Sep 6, 2023
@Emiya0306 Emiya0306 changed the title [InterpolateHtmlPlugin] beforeEmit change to afterTemplateExecution cause lodash template bug. InterpolateHtmlPlugin lodash template bug Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant