Empty layer definition duplicated
levrik opened this issue · comments
Describe the bug
Empty layer definitions not only get added for globalLayer(...)
but also when using them inside style(...)
.
At first I thought that this will change the order of layers but after refreshing my knowledge only the first occurence defines the order so that's okay. Still this behavior is unexpected and I would only expect the empty declarations to be created by globalLayer(...)
and not implicitly by style(...)
as well.
It does not happen when globalLayer(...)
and the usage of the layer inside style(...)
are in the same file.
Reproduction
System Info
System:
OS: macOS 13.6.4
CPU: (8) arm64 Apple M1 Pro
Memory: 65.86 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.19.0 - /opt/homebrew/opt/node@18/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.2.3 - /opt/homebrew/opt/node@18/bin/npm
pnpm: 8.15.4 - ~/Library/pnpm/pnpm
Browsers:
Safari: 17.3.1
npmPackages:
@vanilla-extract/css: 1.14.1 => 1.14.1
@vanilla-extract/recipes: 0.5.1 => 0.5.1
@vanilla-extract/webpack-plugin: 2.3.6 => 2.3.6
Used Package Manager
pnpm
Logs
No response
Validations
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.