Skip to content

Commit

Permalink
docs: update (#597)
Browse files Browse the repository at this point in the history
  • Loading branch information
cap-Bernardito authored Mar 22, 2021
1 parent dde71f0 commit a8ace71
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1142,6 +1142,30 @@ module.exports = {
};
```

##### `yarn workspaces` and `monorepos`

When using `yarn workspaces` or` monorepos`, relative copy paths from node_modules can be broken due to the way packages are hoisting.
To avoid this, should explicitly specify where to copy the files from using `require.resolve`.

**webpack.config.js**

```js
module.exports = {
plugins: [
new CopyPlugin({
patterns: [
{
from: `${path.dirname(
require.resolve(`${moduleName}/package.json`)
)}/target`,
to: "target",
},
],
}),
],
};
```

## Contributing

Please take a moment to read our contributing guidelines if you haven't yet done so.
Expand Down

0 comments on commit a8ace71

Please sign in to comment.