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

CSS config is reused for subsequent builds #3902

Closed
luukdv opened this issue Jun 22, 2021 · 0 comments · Fixed by #3906
Closed

CSS config is reused for subsequent builds #3902

luukdv opened this issue Jun 22, 2021 · 0 comments · Fixed by #3906

Comments

@luukdv
Copy link

luukdv commented Jun 22, 2021

Describe the bug

When running multiple builds, the css config of the first build is reused. When running a build with a different config later on, it won't read from the provided config but will use the one that was encountered first.

Reproduction

I've created a small demo in https://github.com/luukdv/vite-builds. When you run npm i && node build, it will create two directories inside dist. Both are identical because they're built using the postcss config of the first encountered build.

  • Expected: the CSS file in dist/test-1 contains .text-green-500
  • Actual: the CSS file in dist/test-1 contains .text-red-500 (the same as dist/test-2, since this one was built first)

System Info

  System:
    OS: macOS 11.4
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
    Memory: 1.44 GB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.15.4 - ~/.nvm/versions/node/v14.15.4/bin/node
    npm: 6.14.10 - ~/.nvm/versions/node/v14.15.4/bin/npm
  Browsers:
    Chrome: 91.0.4472.114
  npmPackages:
    vite: ^2.3.8 => 2.3.8 

Used package manager: npm

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.

2 participants