nx
nx copied to clipboard
feat(bundling): bump rollup-plugin-typescript2 version
Reproduction
- Create workspace
npx [email protected] --preset=npm --workspaceType=package-based --nxCloud=false bug-demo
cd bug-demo
- Create a library
nx g @nx/js:lib maskito --unitTestRunner=none --bundler=tsc --directory=packages/maskito
- Install
libphonenumber-js
npm i libphonenumber-js
- Use
libphonenumber-jsinsidebug-demo/packages/maskito/src/index.ts:
import {MetadataJson} from 'libphonenumber-js/core';
export const debug: MetadataJson | null = null;
Run nx build maskito => Build is successful ✅
- Install
@nx/rollup
npm i @nx/[email protected] -D
- Change executor of the library
nx g @nx/rollup:configuration --project=maskito --skipValidation
- Run
nx build maskito
It throws error ❌
> nx run maskito:build:production
Bundling maskito...
Error during bundle: Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
Bundle failed: maskito
How to check it ?
- Use the reproduction above
- Add these lines to root
package.json
"overrides": {
"rollup-plugin-typescript2": "0.35.0"
},
- Run again
npm i - Run
nx build maskito
Build is successful ✅
Related Issue(s)
- https://github.com/ezolenko/rollup-plugin-typescript2/issues/446
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| nx-dev | ✅ Ready (Inspect) | Visit Preview | Feb 6, 2024 1:43pm |
☁️ Nx Cloud Report
CI is running/has finished running commands for commit e419cc9ce795494af006fa68c17401cba977c05b. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this CI Pipeline Execution
| 🟥 Failed Commands |
|---|
nx run-many -t check-imports check-commit check-lock-files check-codeowners documentation --parallel=1 --no-dte |
✅ Successfully ran 4 targets
nx affected --targets=lint,test,build --base=6d68236d467812aba4557a2bc7f667157de80fdb --head=e419cc9ce795494af006fa68c17401cba977c05b --parallel=3nx-cloud record -- nx format:check --base=6d68236d467812aba4557a2bc7f667157de80fdb --head=e419cc9ce795494af006fa68c17401cba977c05bnx documentation --no-dtenx affected -t e2e-macos --parallel=1 --base=6d68236d467812aba4557a2bc7f667157de80fdb --head=e419cc9ce795494af006fa68c17401cba977c05b
Sent with 💌 from NxCloud.
☁️ Nx Cloud Report
CI is running/has finished running commands for commit cb934389be9714571ff1c449ea0061ddb4b39437. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this CI Pipeline Execution
✅ Successfully ran 5 targets
nx affected --target=e2e --base=bf62661bb987e1746da04506d32a4d28726cb4ed --head=cb934389be9714571ff1c449ea0061ddb4b39437 --parallel=1nx affected --targets=lint,test,build --base=bf62661bb987e1746da04506d32a4d28726cb4ed --head=cb934389be9714571ff1c449ea0061ddb4b39437 --parallel=3nx run-many -t check-imports check-commit check-lock-files check-codeowners documentation --parallel=1 --no-dtenx-cloud record -- nx format:check --base=bf62661bb987e1746da04506d32a4d28726cb4ed --head=cb934389be9714571ff1c449ea0061ddb4b39437nx documentation --no-dte
Sent with 💌 from NxCloud.
Thank you for your contribution! LGTM :tada:
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.