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

Styles not being recompiled when using --watch mode #3108

Closed
4 of 6 tasks
stigvanbrabant opened this issue Apr 23, 2021 · 3 comments
Closed
4 of 6 tasks

Styles not being recompiled when using --watch mode #3108

stigvanbrabant opened this issue Apr 23, 2021 · 3 comments

Comments

@stigvanbrabant
Copy link

stigvanbrabant commented Apr 23, 2021

Describe the bug

When building my library in watch mode it compiles the css on first build but when rebuilding on change it removes the css file from the folder and only compiles the js files, anybody got an idea why this is happening and how i could resolve this?

Reproduction

https://github.com/stigvanbrabant/vite-issue-repro

System Info

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

  System:
    OS: Linux 5.8 Ubuntu 20.04.2 LTS (Focal Fossa)
    CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
    Memory: 3.20 GB / 15.64 GB
    Container: Yes
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.16.1 - ~/.nvm/versions/node/v14.16.1/bin/node
    npm: 7.10.0 - ~/.nvm/versions/node/v14.16.1/bin/npm
  Browsers:
    Chrome: 90.0.4430.72
    Firefox: 87.0
  npmPackages:
    @vitejs/plugin-vue: ^1.2.1 => 1.2.1 
    vite: ^2.2.1 => 2.2.1 

Used package manager: npm

Logs

 npm run build:watch

> my-lib@0.0.0 build:watch
> vite build --watch

vite v2.2.1 building for production...

watching for file changes...

build started...
transforming (1) src/bundle.js
warn - Tailwind is not purging unused styles because no template paths have been provided.
warn - If you have manually configured PurgeCSS outside of Tailwind or are deliberately not removing unused styles, set `purge: false` in your Tailwind config file to silence this warning.
warn - https://tailwindcss.com/docs/controlling-file-size/#removing-unused-css
 4 modules transformed.
dist/style.css       3157.76kb / brotli: skipped (large chunk)
dist/my-lib.es.js   0.24kb / brotli: 0.17kb
dist/my-lib.umd.js   0.46kb / brotli: 0.26kb
built in 9038ms.

build started...
 4 modules transformed.
dist/my-lib.es.js   0.24kb / brotli: 0.17kb
dist/my-lib.umd.js   0.46kb / brotli: 0.26kb
built in 1347ms.

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.
@Shinigami92
Copy link
Member

@stafyniaksacha You build the feature in #1449 🙂
Do you know how we can fix that? Maybe you could provide a PR?

@stafyniaksacha
Copy link
Contributor

@Shinigami92 Yes, I got the issue this morning too, I am going to investigate

@y1d7ng
Copy link
Contributor

y1d7ng commented Aug 9, 2021

fixed by #3887, 2.4.0-beta.0 and later versions work fine.

@y1d7ng y1d7ng closed this as completed Aug 9, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants