-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I'm having an issue where my compiled JS throws an error if I attempt to use components as selectors: Component selectors can only be used in conjunction with babel-plugin-emotion. My ts-loader configuration looks like this:
{
test: /\.tsx?/,
use: [
{
loader: "ts-loader",
options: {
transpileOnly: true,
getCustomTransformers: () => ({
before: [
createEmotionPlugin({
sourcemap: true,
autoLabel: true,
labelFormat: "[local]",
autoInject: true,
}),
],
}),
compilerOptions: {
jsxFactory: "jsx",
},
onlyCompileBundledFiles: true,
},
},
],
},I can use the css prop without including the jsx pragma, so it seems like the code transform is occurring, but Emotion itself doesn't seem satisfied. I'm using versions:
"@emotion/core": "^10.0.22",
"@emotion/styled": "^10.0.23",
Any ideas what I'm doing incorrectly?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working