Skip to content

Commit

Permalink
Add file path to the example code
Browse files Browse the repository at this point in the history
  • Loading branch information
ahangarha committed Oct 4, 2023
1 parent 9cf3863 commit 93e720c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/common-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ you need to specify a matching pattern in `appllication.js` and `server_renderin
For example, see the below code:

```js
// app/javascript/packs/application.js
const componentRequireContext = require.context('react_rails_components', true, /^(?!.*\.test)^\.\/.*$/)
const ReactRailsUJS = require('react_ujs')
ReactRailsUJS.useContext(componentRequireContext)
Expand Down

0 comments on commit 93e720c

Please sign in to comment.