From c0aa541290479d46d3d40e5a14dc99b1441b4bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20de=20la=20Martini=C3=A8re?= Date: Fri, 4 Mar 2022 15:07:24 +0100 Subject: [PATCH] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 20841b5..c7bcbf9 100644 --- a/README.md +++ b/README.md @@ -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`: