-
Notifications
You must be signed in to change notification settings - Fork 33
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
Feature Request: Option to pass in an array of attributes to be stripped from the html #86
Comments
What type of attributes exactly do you mean? html-minifier(-terser) only minifies the code but does not cover such prod / dev differences since this has not much to do with the general minification. To be honest I never had this use case in more than 11 years. I guess you have a build setup which uses webpack or something else. So there you can do the needed replacements. There are already plugins for webpack and babel which do this: https://www.google.com/search?q=webpack+html+remove+attributes+plugin |
We're not using webpack. The attributes are used during language translation; the localized files have the attributes removed, but the original non-localized files keep the attributes. I've put in a request to the package's repository to include the option to strip the attributes from the original files, but the maintainer(s) have not replied. Was thinking maybe you could piggy-back on the current setting for Understood this is a weird edge-case. Thought I'd ask :) |
I am fine in adding that option to do this, but I don't feel like One way for you is to write a script to read the minified file and replace(remove) attributes may be with regex or whatever that works. or we can introduce a new option may be |
Obviously my preference would be the latter option of |
We have a few attributes we use in dev, but are not needed in prod. Any chance a new setting could be created, allowing an array of attributes to be stripped from the minified html?
The text was updated successfully, but these errors were encountered: