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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS inside Vue Web Components is not working #2923

Closed
jdvivar opened this issue Apr 15, 2019 · 2 comments
Closed

CSS inside Vue Web Components is not working #2923

jdvivar opened this issue Apr 15, 2019 · 2 comments
Labels
馃悰 Bug Stale Inactive issues

Comments

@jdvivar
Copy link

jdvivar commented Apr 15, 2019

馃悰 bug report

When using Vue Web Components, the styles are not attached to the component

馃帥 Configuration (.babelrc, package.json, cli command)

This is the Babel configuration:

{
  "presets": [
    "env"
  ],
  "plugins": [
    "transform-runtime",
    "@babel/plugin-syntax-dynamic-import"
  ]
}

馃 Expected Behavior

Vue Web Component style should be attached to the compoent

馃槸 Current Behavior

It's not attached, see this working demo:
https://78o3xkjmj.codesandbox.io/

馃拋 Possible Solution

This happens in Webpack if shadowMode is false, see this comment:
vuejs/vue-web-component-wrapper#12 (comment)

馃敠 Context

Vue Web Components is another way to create Web Components. I expected Parcel to work correctly in this simple context.

馃捇 Code Sample

This is the code for the working demo:
https://codesandbox.io/s/78o3xkjmj

@ckcks12
Copy link

ckcks12 commented Jul 9, 2019

Hello.
I just figured out that in some file structure parcel produces two separate files - .js and .css.
If you're bundling .html file which includes <script src=".js">, I think parcel attaches style tag to built html file automatically.
However if you're bundling .js file as entry file, it will give you like I said. Is it your case?

@stale
Copy link

stale bot commented Jan 17, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale Inactive issues label Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃悰 Bug Stale Inactive issues
Projects
None yet
Development

No branches or pull requests

3 participants