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

vue style not found #3101

Closed
6 tasks
base-stone opened this issue Apr 23, 2021 · 11 comments
Closed
6 tasks

vue style not found #3101

base-stone opened this issue Apr 23, 2021 · 11 comments

Comments

@base-stone
Copy link

base-stone commented Apr 23, 2021

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.
@base-stone base-stone changed the title style not found vue style not found Apr 23, 2021
@base-stone base-stone reopened this Apr 23, 2021
@patak-dev
Copy link
Member

@leafront would you create a minimal reproduction of this issue in github to share here?

@github-actions
Copy link

Hello @leafront. Please provide a online reproduction by codesandbox or a minimal GitHub repository. Issues labeled by need reproduction will be closed if no activities in 3 days.

@base-stone
Copy link
Author

base-stone commented Apr 23, 2021

Very urgent. Thank you for your attention.

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

@LepkoQQ
Copy link

LepkoQQ commented Apr 23, 2021

I think this is the same problem I'm having, the css dependency is included in the first dynamic import() that depends on that component, but not in others

@base-stone
Copy link
Author

Do you have a solution?

@daiwanxing
Copy link

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

@base-stone
Copy link
Author

What I'm talking about is that there's a problem with the packaged code

@daiwanxing
Copy link

What I'm talking about is that there's a problem with the packaged code

我知道你遇到的打包的问题,我给出的目前可行之策是将你的vite版本降到2.1.5再打包,我本地用2.2.0+以上的版本打包后,css样式并没有被js脚本所引用。

patak-dev added a commit that referenced this issue Apr 25, 2021
@nihalgonsalves
Copy link
Member

Resolved by #3144

@patak-dev
Copy link
Member

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

@daiwanxing
Copy link

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

Thanks!

TobiasMelen pushed a commit to TobiasMelen/vite that referenced this issue May 3, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants