Skip to content

Commit

Permalink
Update Webpack.md (jestjs#7386)
Browse files Browse the repository at this point in the history
* Update Webpack.md

For some reason current order doesn't work if .css file imported using one of the aliases:

```javascript
import styles from 'react/styles/myComponent.css'
```
```bash
SyntaxError: Unexpected token .
```

* fix eslint error
  • Loading branch information
negamaxi authored and rickhanlonii committed Nov 21, 2018
1 parent 72026bf commit 4b9082e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/Webpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,11 @@ And finally we just have the webpack `alias` left to handle. For that we can mak
"moduleDirectories": ["node_modules", "bower_components", "shared"],

"moduleNameMapper": {
"^react(.*)$": "<rootDir>/vendor/react-master$1",
"^config$": "<rootDir>/configs/app-config.js",

"\\.(css|less)$": "<rootDir>/__mocks__/styleMock.js",
"\\.(gif|ttf|eot|svg)$": "<rootDir>/__mocks__/fileMock.js"
"\\.(gif|ttf|eot|svg)$": "<rootDir>/__mocks__/fileMock.js",

"^react(.*)$": "<rootDir>/vendor/react-master$1",
"^config$": "<rootDir>/configs/app-config.js"
}
}
}
Expand Down

0 comments on commit 4b9082e

Please sign in to comment.