Fix emotion labelFormat and sourcemap options (#39389)

fixes https://github.com/vercel/next.js/issues/39386
This commit is contained in:
LongYinan 2022-08-08 10:52:44 +08:00 committed by GitHub
parent 8ddcc6aedb
commit 4da09da1a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,9 +152,9 @@ function getEmotionOptions(nextConfig, development) {
return {
enabled: true,
autoLabel,
labelFormat: nextConfig?.experimental?.emotion?.labelFormat,
labelFormat: nextConfig?.compiler?.emotion?.labelFormat,
sourcemap: development
? nextConfig?.experimental?.emotion?.sourceMap ?? true
? nextConfig?.compiler?.emotion?.sourceMap ?? true
: false,
}
}