Skip to content

Commit

Permalink
docs: add script to add all scoped packages
Browse files Browse the repository at this point in the history
  • Loading branch information
MostafaNawara committed Dec 13, 2021
1 parent c5f548e commit c6c8914
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ const withTM = require('next-transpile-modules')(['styleguide/node_modules/lodas
// ...
```

Also, You add all scoped packages if you need

```js
const packageJSON = require('./package.json');

const transpiledPackages = Object.keys(packageJSON.dependencies).filter(it => it.includes('@shared/'));

const withTM = require('next-transpile-modules')([...transpiledPackages]);
```

### With `next-compose-plugins`:

```js
Expand Down

0 comments on commit c6c8914

Please sign in to comment.