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

<style> code in .vue file not load #521

Open
rogerluo410 opened this issue Oct 15, 2024 · 2 comments
Open

<style> code in .vue file not load #521

rogerluo410 opened this issue Oct 15, 2024 · 2 comments
Labels

Comments

@rogerluo410
Copy link

rogerluo410 commented Oct 15, 2024

Notice: A bug is a crash or incorrect behavior. If you have a debugging or troubleshooting question, please open a discussion on the Discussions Tab. Otherwise, remove this line and fill out the following sections.

Expected behavior:

<style scoped lang="scss">
.title {
  color: red !important;
}
</style>

this code in .vue file will be load.

Actual behavior:

pre-compiled, but, not load when view the page.

Small, reproducible repo:

image image image image

This is experiment repo url: https://github.com/rogerluo410/shaka

Setup environment:

  • Ruby version: 3.3.0
  • Rails version: 7.0.8
  • Shakapacker version: 8.0
@rogerluo410
Copy link
Author

rogerluo410 commented Oct 18, 2024

I saw webpacker had same problem before,
had to include same file both with

<%= stylesheet_pack_tag 'hello_vue' %> 
<%= javascript_pack_tag 'hello_vue' %>

But, it could include javascript_pack_tag only now.
FYI: rails/webpacker#987 (comment)

@justin808 justin808 added question and removed bug labels Oct 18, 2024
@rogerluo410
Copy link
Author

rogerluo410 commented Oct 21, 2024

image image image

Although uses stylesheet_pack_tag which could load <style> tag of .vue, the scoped attribute is not useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants