Skip to content
Permalink
Browse files

Merge pull request #40 from andrewmurph/update-readme

Update README to include adding webpack aliases.
  • Loading branch information...
geolessel committed Mar 19, 2019
2 parents bba83bf + 6b9857a commit 79f0262150e5948f71297bd566f916ef256904c3
Showing with 20 additions and 0 deletions.
  1. +20 −0 README.md
@@ -75,6 +75,26 @@ or
yarn
```

#### `npm` users
`npm` unfortunately needs an extra bit of configuration to make it happy. Add the following block to your
`assets/webpack.config.js` file. If you use `yarn` to manage your dependencies, this extra bit of
configuration should not be necessary.

```js
module.exports = (env, options) => ({
...
// ADD THIS BLOCK ˅˅˅
resolve: {
alias: {
react: path.resolve(__dirname, './node_modules/react'),
'react-dom': path.resolve(__dirname, './node_modules/react-dom')
}
}
// ADD THIS BLOCK ^^^
...
});
```

### 3. Make sure React and Babel presets are installed

0 comments on commit 79f0262

Please sign in to comment.
You can’t perform that action at this time.