-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Fix/styles in vue sfc not injected to shadow dom #784
base: main
Are you sure you want to change the base?
Fix/styles in vue sfc not injected to shadow dom #784
Conversation
…it in config file to bundle js file.
… then replace it in packager
Sorry, I've clicked a wrong button. |
@gogoend no worries, re-openning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very interesting - I assume you copied the js file from parcel upstream and pruned their flow type.
Any chance we can use their module directly, and do minor tweak if needed? (i.e via subclassing, or via referencing their exported functions?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the file is from the dist file of https://github.com/parcel-bundler/parcel/blob/v2/packages/packagers/js/src/ScopeHoistingPackager.js .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use typescript for this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this copied from upstream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very intrigued by this PR - the ability to package a separate bundle for style and inject it directly into the transformer seems very powerful. It's a tad sad that the parcel upstream source is flow-based, forcing downstream consumer to resolve to a lot of module copy hack instead of import their stuff directly with typing lol..
Tho, we were able to pull some of their file. So maybe we can reduce the amount of tech debt/copied over code by doing something similar?
see: https://github.com/PlasmoHQ/plasmo/blob/main/core/parcel-core/src/index.ts#L6-L33
emmmm, in fact, I'm trying to do some explorations, and want to view the diff online, but choose the wrong repo, and open this PR by accident. Maybe I should view the diff in my forked repo . |
oh lol - feel free to do it however you like, not a bad PR at all. It helps with visibility too |
Details
This PR aims to fix the issue: The style tag in the nested component in content scripts doesn't take effect when using Vue SFC.
What I've done is:
VUE_SFC_STYLE_PLACEHOLDER
when process thestyle-raw
pipeline in parcel-transformer-vueCode of Conduct
Contacts
If your PR is accepted, we will award you with the
Contributor
role on Discord server.To join the server, visit: https://www.plasmo.com/s/d