mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 02:13:00 +08:00
feat: add @emotion/babel-plugin
This commit is contained in:
@@ -7,6 +7,21 @@ if (process.env.NODE_ENV === 'development' || process.env.COVERAGE === 'true') {
|
||||
plugins.push('istanbul');
|
||||
}
|
||||
|
||||
plugins.push([
|
||||
'@emotion',
|
||||
{
|
||||
// See https://emotion.sh/docs/@emotion/babel-plugin
|
||||
importMap: {
|
||||
'@/styles': {
|
||||
styled: {
|
||||
canonicalImport: ['@emotion/styled', 'default'],
|
||||
styledBaseImport: ['@/styles', 'styled'],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
module.exports = {
|
||||
presets: ['next/babel'],
|
||||
plugins,
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
"yjs": "^13.5.44"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@emotion/babel-plugin": "^11.10.5",
|
||||
"@types/node": "18.7.18",
|
||||
"@types/react": "18.0.20",
|
||||
"@types/react-dom": "18.0.6",
|
||||
|
||||
Reference in New Issue
Block a user