updated emotion compiler import map to fix nested component ref not handled issue

This commit is contained in:
Abhinav 2023-04-06 18:20:45 +05:30
parent af0da77f30
commit 25592024cb
2 changed files with 22 additions and 1 deletions

View file

@ -23,6 +23,27 @@ const IS_SENTRY_ENABLED = getIsSentryEnabled();
module.exports = (phase) =>
withSentryConfig(
withBundleAnalyzer({
compiler: {
emotion: {
importMap: {
'@mui/material': {
styled: {
canonicalImport: ['@emotion/styled', 'default'],
styledBaseImport: ['@mui/material', 'styled'],
},
},
'@mui/material/styles': {
styled: {
canonicalImport: ['@emotion/styled', 'default'],
styledBaseImport: [
'@mui/material/styles',
'styled',
],
},
},
},
},
},
transpilePackages: [
'@mui/material',
'@mui/system',

View file

@ -23,6 +23,6 @@
"jsxImportSource": "@emotion/react",
"incremental": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
"exclude": ["node_modules", "out", ".next", "thirdparty"]
}