Skip to content

Commit

Permalink
chore: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nvh95 committed Apr 14, 2022
1 parent 907155a commit 0305b5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 81 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ pnpm install --dev jest-preview

### 2. Configure jest's transform to transform CSS and files

`jest-preview` comes with pre-configured transformations to intercept CSS and files. This is a recommended way to configure. However, you can configure it yourself using exported transform functions as well. See [Advanced configurations](#advanced-configurations) for more
`jest-preview` comes with pre-configured transformations to intercept CSS and files. This is a recommended way to configure. However, you can configure it yourself using exported transform functions as well. See [Advanced configurations](#advanced-configurations) for more.

Update `jest.config.js`:

```json
// jest.config.js
transform: {
"^.+\\.css$": "jest-preview/transforms/css",
"^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)": "jest-preview/transforms/file",
Expand Down
76 changes: 0 additions & 76 deletions cssTransform.js

This file was deleted.

6 changes: 3 additions & 3 deletions examples/create-react-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Except for step 2 of installation: **Configure jest's transform to transform CSS

```json
transform: {
// Other transforms
"^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)": "jest-preview/transforms/file",
},
// Other transforms
"^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)": "jest-preview/transforms/file",
}
```

## Caveats
Expand Down

0 comments on commit 0305b5c

Please sign in to comment.