Closed kravetsone closed 3 days ago
npm init
smartbundle
npm i smartbundle -d
@babel/core
PS Z:\PROJECTS\shit\smartbundle-repro> npm why @babel/core @babel/core@7.26.0 optional node_modules/@babel/core peer @babel/core@"^7.0.0" from @babel/helper-module-transforms@7.26.0 node_modules/@babel/helper-module-transforms @babel/helper-module-transforms@"^7.26.0" from @babel/core@7.26.0 optional @babel/core@"^7.26.0" from smartbundle@0.11.0 node_modules/smartbundle smartbundle@"^0.11.0" from the root project
so he detects babel, which he downloaded himself
PS Z:\PROJECTS\shit\smartbundle-repro> npx smartbundle Detecting modules ✅ typescript, version: 5.7.2 ✅ babel, version: 7.26.0 ❌ react ======================================== ✅ Vite
@babel/core is peer dependency of https://npmjs.com/package/@babel/helper-module-transforms?activeTab=code
https://npmjs.com/package/@babel/helper-module-transforms?activeTab=code
"devDependencies": { "@babel/core": "^7.26.0" }, "peerDependencies": { "@babel/core": "^7.0.0" },
When @babel/helper-module-transforms is dependency of @babel/core
@babel/helper-module-transforms
Maybe it not smartbundle bug at all
https://github.com/blasdfaa/fastify-tma also affects this issue. Babel can be guilty of the long compilation time in the above lib.
related issue in pnpm: https://github.com/pnpm/pnpm/issues/5928
Reproduciton
smartbundle
to dev deps@babel/core
in your depsso he detects babel, which he downloaded himself
@babel/core
is peer dependency ofhttps://npmjs.com/package/@babel/helper-module-transforms?activeTab=code
When
@babel/helper-module-transforms
is dependency of@babel/core
Maybe it not
smartbundle
bug at all