Skip to content

Commit

Permalink
feat: removing fileCRA
Browse files Browse the repository at this point in the history
  • Loading branch information
nvh95 committed Jul 13, 2022
1 parent 29431f8 commit fc761a8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.2.8

## Chores

- Merge `file` and `fileCRA` transformations

# 0.2.7

## Chores
Expand Down
2 changes: 1 addition & 1 deletion cli/configCra.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ try {
'react-scripts/config/jest/babelTransform.js',
'^.+\\.(css|scss|sass)$': 'jest-preview/transforms/css',
'^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)':
'jest-preview/transforms/fileCRA',
'jest-preview/transforms/file',
};
jestConfig.transformIgnorePatterns =
jestConfig.transformIgnorePatterns.filter(
Expand Down
2 changes: 1 addition & 1 deletion examples/create-react-app/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
// Update the regex to support css and sass
'^.+\\.(css|scss|sass)$': 'jest-preview/transforms/css',
'^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)':
'jest-preview/transforms/fileCRA',
'jest-preview/transforms/file',
},
transformIgnorePatterns: [
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$',
Expand Down
2 changes: 1 addition & 1 deletion website/blog/2022-05-23-first-class-support-cra/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module.exports = {
'react-scripts/config/jest/babelTransform.js',
'^.+\\.(css|scss|sass)$': 'jest-preview/transforms/css',
'^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)':
'jest-preview/transforms/fileCRA',
'jest-preview/transforms/file',
},
transformIgnorePatterns: [
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$',
Expand Down
2 changes: 0 additions & 2 deletions website/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ transform: {
}
```

For Create React App users, please use `jest-preview/transforms/fileCRA` instead of `jest-preview/transforms/file`. See more at [Create React App example](/docs/examples/create-react-app).

For Next.js users with Rust-based compiler, please use [configureNextJestPreview](/docs/api/configureNextJestPreview) to config Jest. See more at [Next.js example](https://github.com/nvh95/jest-preview/tree/main/examples/nextjs).

### 3. If you use CSS Modules, make sure it doesn't get ignored
Expand Down

0 comments on commit fc761a8

Please sign in to comment.