How do I build a React library with this? #1998
Answered
by
alvarlagerlof
alvarlagerlof
asked this question in
Q&A
-
I want to build a npm package that exports a react component and some hooks. Building works fine, but I keep on getting this Here's my config: {
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": true,
"decorators": true,
"dynamicImport": true
},
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true
},
"target": "es2018",
"keepClassNames": true,
"loose": true
},
"module": {
"type": "commonjs",
"strict": true,
"strictMode": true,
"lazy": false,
"noInterop": true
},
"sourceMaps": "inline"
} |
Beta Was this translation helpful? Give feedback.
Answered by
alvarlagerlof
Aug 3, 2021
Replies: 1 comment 2 replies
-
My issue wasn't swc but the fact that I hadn't included react and react-dom in devDependencies |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
alvarlagerlof
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My issue wasn't swc but the fact that I hadn't included react and react-dom in devDependencies