Skip to content

Commit

Permalink
fix(bundling): use projectRoot for assets (#29978)
Browse files Browse the repository at this point in the history
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior

When bundling rollup copies wrong readme which ends up in publishing a
root monorepo readme, not a package one

## Expected Behavior

It shoud take the right Readme.md

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #29975
  • Loading branch information
ThePlenkov authored Feb 25, 2025
1 parent 63cb68d commit 2fc1945
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = withNx(
tsConfig: './tsconfig.lib.json',
compiler: 'babel',
format: ['esm'],
assets: [{ input: '.', output: '.', glob: '*.md' }],
assets: [{ input: '{projectRoot}', output: '.', glob: '*.md' }],
},
{
// Provide additional rollup configuration here. See: https://rollupjs.org/configuration-options
Expand Down Expand Up @@ -100,7 +100,7 @@ module.exports = withNx(
tsConfig: './tsconfig.custom.json',
compiler: 'babel',
format: ['esm'],
assets: [{ input: '.', output: '.', glob: '*.md' }],
assets: [{ input: '{projectRoot}', output: '.', glob: '*.md' }],
},
{
// Provide additional rollup configuration here. See: https://rollupjs.org/configuration-options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ module.exports = withNx(
format: ${JSON.stringify(options.format ?? ['esm'])},${
!isTsSolutionSetup
? `
assets: [{ input: '.', output: '.', glob:'*.md' }],`
assets: [{ input: '{projectRoot}', output: '.', glob:'*.md' }],`
: ''
}
},
Expand Down

0 comments on commit 2fc1945

Please sign in to comment.