This repository was archived by the owner on Oct 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Compatible with react-scripts-ts?Β #22
Copy link
Copy link
Open
Description
I'm attempting to get this working with a Create React App project that's using react-scripts-ts. Here's what I've tried:
npm install --save-dev babel-plugin-styled-componentsnpm install --save react-app-rewire-styled-componentsnpm install --save-dev react-app-rewired- Add a config-overrides.js file to the root:
const rewireStyledComponents = require('react-app-rewire-styled-components');
module.exports = function override(config, env) {
config = rewireStyledComponents(config, env, {
displayName: true
});
return config;
}
- Add a .babelrc file to the root:
{
"plugins": ["babel-plugin-styled-components"]
}
- Update package.json:
"start": "react-app-rewired start --scripts-version react-scripts-ts",
"build": "react-app-rewired build --scripts-version react-scripts-ts",
"test": "react-app-rewired test --env=jsdom --scripts-version react-scripts-ts",
npm start
Unfortunately, it doesn't seem to be working as the friendly class names aren't included:

Do you have any ideas on what I might try next to get this working?
tonyfromundefined, stefanfuchs, yugandhar-pathi, ismailhabib and viny-movember
Metadata
Metadata
Assignees
Labels
No labels