You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@nx/esbuild:esbuild with thirdParty: false using pnpm bundles all dependencies. With yarn it works as expected, bundling only local projects, and adding external dependencies to package.json.
Expected Behavior
@nx/esbuild:esbuild with thirdParty: false bundles only local repo projects with pnpm, the same way it works with yarn.
GitHub Repo
No response
Steps to Reproduce
create js project with esbuild bundling
add thirdParty: false to @nx/esbuild:esbuild options
add some external dependencies to project and bundle
I suspect this is because of the different layout of node_modules when using pnpm. I also use generatePackageJson: true to generate package.json, and with pnpm my package.json looks like this:
{
"name": "@teve/task4s-firebase",
"engines": {
"node": "18"
},
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"dependencies": {
"tslib": "^2.5.3"
},
"private": true
}
and the bundle is 664550 lines long
and with yarn my package.json looks like this:
{
"name": "@teve/task4s-firebase",
"engines": {
"node": "18"
},
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"dependencies": {
"@azure/msal-common": "13.0.0",
"@azure/msal-node": "1.17.2",
"@microsoft/microsoft-graph-client": "3.0.5",
"date-fns": "2.30.0",
"firebase-admin": "11.8.0",
"firebase-functions": "4.4.0",
"gaxios": "5.1.0",
"google-auth-library": "8.8.0",
"googleapis": "118.0.0",
"lru-cache": "9.1.1",
"tslib": "^2.5.2"
},
"private": true
}
and the bundle is 1184 lines long
atsjo
changed the title
@nx/esbuild:esbuild with thirdParty: false using pnpm bundles all dependencies
@nx/esbuild:esbuild with thirdParty: false using pnpm 8.6.0 bundles all dependencies
Jun 5, 2023
pnpm v8.6.2 reverts lockfile version number back to 6.0, to fix compatibility issues with older versions of pnpm... That also fixes this issue, as the version matching code in nx now works again:-)
Current Behavior
@nx/esbuild:esbuild with thirdParty: false using pnpm bundles all dependencies. With yarn it works as expected, bundling only local projects, and adding external dependencies to package.json.
Expected Behavior
@nx/esbuild:esbuild with thirdParty: false bundles only local repo projects with pnpm, the same way it works with yarn.
GitHub Repo
No response
Steps to Reproduce
I suspect this is because of the different layout of node_modules when using pnpm. I also use generatePackageJson: true to generate package.json, and with pnpm my package.json looks like this:
{
"name": "@teve/task4s-firebase",
"engines": {
"node": "18"
},
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"dependencies": {
"tslib": "^2.5.3"
},
"private": true
}
and the bundle is 664550 lines long
and with yarn my package.json looks like this:
{
"name": "@teve/task4s-firebase",
"engines": {
"node": "18"
},
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"dependencies": {
"@azure/msal-common": "13.0.0",
"@azure/msal-node": "1.17.2",
"@microsoft/microsoft-graph-client": "3.0.5",
"date-fns": "2.30.0",
"firebase-admin": "11.8.0",
"firebase-functions": "4.4.0",
"gaxios": "5.1.0",
"google-auth-library": "8.8.0",
"googleapis": "118.0.0",
"lru-cache": "9.1.1",
"tslib": "^2.5.2"
},
"private": true
}
and the bundle is 1184 lines long
Nx Report
Failure Logs
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: