Skip to content

Add RN custom extension note to readme #141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ In contrast to [`react-css-modules`](https://github.com/gajus/react-css-modules)
* [Configuration](#configuration)
* [Configurate syntax loaders](#configurate-syntax-loaders)
* [Installation](#installation)
* [React Native](#react-native)
* [Demo](#demo)
* [Example transpilations](#example-transpilations)
* [Anonymous `styleName` resolution](#anonymous-stylename-resolution)
Expand Down Expand Up @@ -257,6 +258,21 @@ When `babel-plugin-react-css-modules` cannot resolve CSS module at a compile tim
npm install babel-plugin-react-css-modules --save
```


### React Native

If you'd like to get this working in React Native, you're going to have to allow custom import extensions, via a `rn-cli.config.js` file:

```js
module.exports = {
getAssetExts() {
return ["scss"];
}
}
```

Remember, also, that the bundler caches things like plugins and presets. If you want to change your `.babelrc` (to add this plugin) then you'll want to add the `--reset-cache` flag to the end of the package command.

### Demo

```bash
Expand Down