How to setup the typescript-styled-plugin
predragnikolic opened this issue · comments
Предраг Николић commented
This is a guide on how to setup the typescript-styled-plugin.
The best is to follow the installation instructions on https://github.com/microsoft/typescript-styled-plugin.
- In terminal run:
npm install --save-dev typescript-styled-plugin typescript
npm install --save styled-components
npm i --save-dev @types/styled-components
- The tsconfig.json file should include this plugin:
{
"compilerOptions": {
"plugins": [
{
"name": "typescript-styled-plugin",
"tags": [
"styled",
"mytag"
]
}
]
}
}
- Optionally configure the tags array.
Create a index.ts file:
import styled from 'styled-components'
styled.button`
color: blue;
background: red;
`
Rafał Chłodnicki commented
I wonder if we should enable and put it in Wiki or Discussions.