Missing statement when building #11330
Labels
bug: upstream
Bug in a dependency of Vite
p3-minor-bug
An edge case that only affects very specific usage (priority)
Describe the bug
When I bundle and build postcss, the required statement is missing.
But in dev mode the problem does not occur.
It also happens even when minify is turned off, so I didn't know the cause. I suspect rollup is the cause of the problem, but didn't know how to check. Please let me know if you know what I should try.
Reproduction
https://github.com/ota-meshi/vite-issue-2022-12
Steps to reproduce
npm install
npm run build-and-open
(This willvite build
and runnpx http-server dist -o
.)Note that dev mode does not have this problem.
The actual problematic source code is below.
https://github.com/postcss/postcss/blob/1d4c509c114a0dd8270cb5241c5eee7d01f91674/lib/tokenize.js#L235-L241
Original:
Output:
System Info
System: OS: macOS 12.4 CPU: (4) x64 Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz Memory: 27.96 MB / 8.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.12.0 - /usr/local/bin/node Yarn: 1.22.11 - /usr/local/bin/yarn npm: 8.19.2 - /usr/local/bin/npm Browsers: Chrome: 108.0.5359.98 Chrome Canary: 110.0.5468.0 Firefox: 79.0 Safari: 15.5 npmPackages: vite: ^4.0.0 => 4.0.0
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: