question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vue style not found

See original GitHub issue

Describe the bug

vite build Production environment package style file missing

Reproduction

https://github.com/leafront/my-vue-app

System Info

Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:

  System:
    OS: windows 10
    CPU: (12) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
    Memory: 12 GB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.16.1 - D:\Program Files\nodejs\
    npm: 6.14.12 - ~D:\Program Files\nodejs\npm
  Browsers:
    Chrome: 89.0.4389.114

Used package manager:

Logs

╰─➤  sudo npm run build                                                     1 ↵
Password:

> my-vue-app@0.0.0 build /Users/leaf/my-vue-app
> vite build

vite v2.2.1 building for production...
✓ 17 modules transformed.
dist/index.html                       0.71kb
dist/assets/Footer.9ea5d8f6.js        0.14kb / brotli: 0.11kb
dist/assets/HelloWorld.5224c65b.js    0.28kb / brotli: 0.18kb
dist/assets/HelloWorld.7ca16950.css   0.02kb / brotli: 0.02kb
dist/assets/Test.cda07b1d.js          0.27kb / brotli: 0.17kb
dist/assets/Footer.9751d05f.css       0.04kb / brotli: 0.03kb
dist/assets/index.974cc591.js         1.85kb / brotli: 0.82kb
dist/assets/vendor.7f384ad1.js        64.02kb / brotli: 22.47kb



Before submitting the issue, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
  • Provide a description in this issue that describes the bug.
  • Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
patak-devcommented, Apr 25, 2021

@daiwanxing @leafront @LepkoQQ the fix was released in Vite v2.2.3, you should be able to update to it in your projects

2reactions
daiwanxingcommented, Apr 25, 2021

You can lock the vite version to 2.1.5 to solve this problem, I tested my local environment and found that this error occurs when the vite version >= 2.2.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

why my css code is not working in vuejs? - Stack Overflow
When you use scoped on style tags in .vue files it adds an attribute specifier to each of your CSS selectors. When Vue...
Read more >
I don't know why style tag not working - Get Help - Vue Forum
Hello, I'm relatively new to Vue and now trying to make a simple SPA webpage. And I ran into this problem and can't...
Read more >
Styling Vue components with CSS - Learn web development
While this tutorial will not be using such tools, it's good to know that when including such code in the assets folder it...
Read more >
Styling Vue Single-File Components - This Dot Labs
By using the :deep() pseudo class, we are able to tell Vue that this particular class ( .card-title ) should not be scoped....
Read more >
Vue.js scoped CSS: learn how can you benefit from it
So, if you ever wondered why is your Vue js scoped style not working, that's probably because you missed the point that the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found