Skip to content

Commit 2fc1945

Browse files
authored
fix(bundling): use projectRoot for assets (#29978)
<!-- 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
1 parent 63cb68d commit 2fc1945

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/rollup/src/generators/configuration/configuration.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ module.exports = withNx(
7171
tsConfig: './tsconfig.lib.json',
7272
compiler: 'babel',
7373
format: ['esm'],
74-
assets: [{ input: '.', output: '.', glob: '*.md' }],
74+
assets: [{ input: '{projectRoot}', output: '.', glob: '*.md' }],
7575
},
7676
{
7777
// Provide additional rollup configuration here. See: https://rollupjs.org/configuration-options
@@ -100,7 +100,7 @@ module.exports = withNx(
100100
tsConfig: './tsconfig.custom.json',
101101
compiler: 'babel',
102102
format: ['esm'],
103-
assets: [{ input: '.', output: '.', glob: '*.md' }],
103+
assets: [{ input: '{projectRoot}', output: '.', glob: '*.md' }],
104104
},
105105
{
106106
// Provide additional rollup configuration here. See: https://rollupjs.org/configuration-options

packages/rollup/src/generators/configuration/configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ module.exports = withNx(
111111
format: ${JSON.stringify(options.format ?? ['esm'])},${
112112
!isTsSolutionSetup
113113
? `
114-
assets: [{ input: '.', output: '.', glob:'*.md' }],`
114+
assets: [{ input: '{projectRoot}', output: '.', glob:'*.md' }],`
115115
: ''
116116
}
117117
},

0 commit comments

Comments
 (0)