babel-plugin-styled-components
babel-plugin-styled-components copied to clipboard
Plugin no longer transforming codebase as of v1.10.3
Just updated from v1.10.0
to v1.10.6
and finding the plugin no longer transforming any of my code. I managed to get it to kick back in by downgrading to v1.10.2
.
My snapshots capture this by failing with these kinds of mismatches,
- "componentId": "ComponentName___default-sc-15na3pr-0", /// v1.10.2 with RHL
+ "componentId": "ComponentName-sc-15na3pr-0", //v1.10.2 without RHL
+ "componentId": "sc-bdVaJa", //v1.10.3+
If it helps debug the issue, I can confirm that the ___default
injection appears when react-hot-loader/babel
is enabled. Removing react-hot-loader
from the plugin chain doesn't make [email protected]
transform any of my code, however.
Babel configuration looks like this:
{
"plugins": [
"babel-plugin-styled-components",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-runtime",
"@babel/plugin-transform-object-assign",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-transform-react-constant-elements",
"react-hot-loader/babel"
],
"presets": [
[
"@babel/preset-env",
{
"targets": {
"ie": "11"
}
}
],
"@babel/preset-react",
"@babel/preset-typescript"
]
}
Sorry if this is a bad bug report? I'm not used to opening GitHub issues. Could this be related to @babel/plugin-proposal-dynamic-import
becoming part of @babel/core
as of v7.5.0?
👍 We are seeing the same issue
Same issue with version 1.10.6, everything works with 1.10.5. .babelrc content:
{
"presets": ["@babel/env"],
"plugins": [
[
"babel-plugin-styled-components",
{
"minify": true,
"transpileTemplateLiterals": true,
"fileName": false,
"displayName": true,
"ssr": false
}
]
]
}
Same issue here.
There is a potential fix for you in #261 @ChrisAckerman @AndyBan @ppiyush13