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

[Bug]: CSS empty selector will cause Postcss parsing error: Error: Unsupported previous source map format: [object Object] #3167

Closed
yArna opened this issue Aug 8, 2024 · 2 comments
Labels
🐞 bug Something isn't working

Comments

@yArna
Copy link

yArna commented Aug 8, 2024

Version

System:
OS: macOS 14.5
CPU: (11) arm64 Apple M3 Pro
Memory: 112.67 MB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.12.1 - /usr/local/bin/node
Yarn: 1.22.21 - ~/.npm-global/bin/yarn
npm: 10.5.0 - /usr/local/bin/npm
pnpm: 9.1.3 - ~/.npm-global/bin/pnpm
bun: 1.1.12 - ~/.bun/bin/bun
Browsers:
Chrome: 127.0.6533.90
Chrome Canary: 129.0.6644.0
Edge: 127.0.2651.86
Safari: 17.5

Details

If the style of the vue file is an empty selector, rsbuild dev will fail, but rsbuild build will succeed

<style >
body {
}
</style>
start   Compiling...
error   Compile error: 
Failed to compile, check the errors for troubleshooting.
File: /Users/xxxx/Test/rsbuild/packages/a-project/src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=css:1:1
  × Module build failed:
  ╰─▶   × Error: HookWebpackError:   × Module build failed:
           ╰─▶   × Error: Unsupported previous source map format: [object Object]
                      at PreviousMap.loadMap (/Users/xxxx/Test/rsbuild/node_modules/.pnpm/postcss@8.4.41/node_modules/postcss/lib/previous-map.js:117:15)
                      at new PreviousMap (/Users/xxxx/Test/rsbuild/node_modules/.pnpm/postcss@8.4.41/node_modules/postcss/lib/previous-map.js:23:21)
                      at new Input (/Users/xxxx/Test/rsbuild/node_modules/.pnpm/postcss@8.4.41/node_modules/postcss/lib/input.js:49:17)
                      at parse (/Users/xxxx/Test/rsbuild/node_modules/.pnpm/postcss@8.4.41/node_modules/postcss/lib/parse.js:8:15)
                      at new LazyResult (/Users/xxxx/Test/rsbuild/node_modules/.pnpm/postcss@8.4.41/node_modules/postcss/lib/lazy-result.js:133:16)
                      at Processor.process (/Users/xxxx/Test/rsbuild/node_modules/.pnpm/postcss@8.4.41/node_modules/postcss/lib/processor.js:53:14)

Reproduce link

https://github.com/yArna/bug-rsbuild/tree/main

Reproduce Steps

$ cd packages/a-project
$ npm run dev
@chenjiahan
Copy link
Member

@yArna
Copy link
Author

yArna commented Aug 9, 2024

Very happy that the problem has been solved

@yArna yArna closed this as completed Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants