Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
martpie committed Mar 4, 2022
1 parent fcc04db commit c0aa541
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,13 @@ const withTM = require('next-transpile-modules')(['styleguide/node_modules/lodas
// ...
```

Also, You add all scoped packages if you need
If you need to install all packages of a certain scope (**it is highly discouraged**), you can do the following:

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

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

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

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

0 comments on commit c0aa541

Please sign in to comment.