Skip to content
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

The type attribute of the appended tag could be configurable #315

Closed
Nouzbe opened this issue Apr 17, 2018 · 3 comments
Closed

The type attribute of the appended tag could be configurable #315

Nouzbe opened this issue Apr 17, 2018 · 3 comments

Comments

@Nouzbe
Copy link
Contributor

Nouzbe commented Apr 17, 2018

Do you want to request a feature or report a bug?

Request a feature

What is the current behavior?
The attributes of the style or link tag that is appended to the DOM are configurable thanks to the attrs options, except for type which is always set to "text/css"

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?
The type could be configurable just like all other attributes.

If this is a feature request, what is motivation or use case for changing the behavior?
Projects using less in browser need style elements with the type text/less to be appended to the DOM.

Please mention other relevant information such as your webpack version, Node.js version and Operating System.
This could be a 4 lines change. I believe that replacing:

options.attrs.type = "text/css";

with

if(options.attrs.type === undefined) {
  options.attrs.type = "text/css";
}

in addStyles.js#L204 and addStyles.js#L215 would do the job.

@alexander-akait
Copy link
Member

@Nouzbe PR welcome

@alexander-akait
Copy link
Member

Done in #316 (review), in near time we release this. Thanks!

@Nouzbe
Copy link
Contributor Author

Nouzbe commented Apr 17, 2018

Thank you, that was efficient 💪

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

2 participants