Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nwalters512/ncc-babel-bug-repro
https://github.com/nwalters512/ncc-babel-bug-repro
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/nwalters512/ncc-babel-bug-repro
- Owner: nwalters512
- Created: 2022-08-29T19:47:57.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-29T20:18:03.000Z (about 2 years ago)
- Last Synced: 2024-10-10T03:10:52.058Z (27 days ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ncc-babel-bug-repro
This PR reproduces a bug with `@vercel/ncc` where it's unable to correctly trace external files when source files have been processed with Babel.
## Reproduction instructions
Run `yarn` to install `@vercel/ncc`.
Run `yarn build:working` and observe how `worker.js` is correctly copied to `dist-working/worker.js`:
```
ncc: Version 0.34.0
ncc: Compiling file index.js into CJS
Emitting /Users/nwalters/git/ncc-babel-bug-repro/node_modules/@nwalters512/working/worker.js for static use in module /Users/nwalters/git/ncc-babel-bug-repro/node_modules/@nwalters512/working/index.js
0kB dist-working/worker.js
2kB dist-working/index.js
2kB [200ms] - ncc 0.34.0
```Run `yarn build:failing` and observe how `worker.js` is **NOT** copied to `dist-failing/worker.js`:
```
ncc: Version 0.34.0
ncc: Compiling file index.js into CJS
3kB dist-failing/index.js
3kB [199ms] - ncc 0.34.0
```