-
Notifications
You must be signed in to change notification settings - Fork 68
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
feat: add custom attrs to <style></style> #36
base: master
Are you sure you want to change the base?
Conversation
What's the use case for this? |
Our app has a dynamic route to load asynchronous components(thousands) which are built in a separated project. The async component will inject style tags to head when loaded, we want to clear the style tags injected by the async component when the route changes, so we need an identifier to know which tags are injected by async components. The webpack
|
Why do you need to remove the style tags? Is it causing performance issues? |
Because some async components add global styles(without scoped), when the route changes, I want to remove the side effects(global styles) when loading another async component. |
This feature is also needed in one of the projects I am working on. We have an app which is creating a sourceless Iframe. The styles are being injected to the root document head but we would need them to be injected inside the iframe since vue components lives inside of it. Going further it would be even better to have an option insertInto just like webpack style-loader has it. |
This would also be useful for adding |
I've updated the PR by changing |
@yyx990803 i need to add attribute to target the style when changing theme colors |
I also need supported I am writing a library with
|
I also need to be supported I want to find marked |
I also need this feature. |
Please do add this |
Any news on this? |
What kind of change does this PR introduce?
feature
Did you add tests for your changes?
Yes
If relevant, did you update the README?
Yes
Summary
with webpack configuration
will result in
Does this PR introduce a breaking change?
No
UPDATE
change
attrs
toattributes
forstyle-loader@1.x
has been updated.