Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use pnpm to run the build-web script #1

Merged
merged 2 commits into from
Nov 9, 2022
Merged

Conversation

kormide
Copy link
Collaborator

@kormide kormide commented Nov 3, 2022

To break up the pnpm prefactor, the goal of this PR is to just get the build-web script working, which builds the main web application.

@kormide kormide requested a review from jbedard November 3, 2022 22:09
client/web/package.json Outdated Show resolved Hide resolved
@kormide kormide force-pushed the pnpm-prefactor branch 4 times, most recently from 998a91b to a2164a0 Compare November 7, 2022 22:41
@kormide kormide changed the title refactor: use pnpm refactor: use pnpm to run the build-web script Nov 7, 2022
Comment on lines 235 to 238
fallback: {
path: require.resolve("path-browserify"),
util: require.resolve("util/")
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why I had to add this when the yarn build handled this just fine.

Comment on lines +375 to +376
"@opentelemetry/resources": "^1.7.0",
"@opentelemetry/sdk-trace-base": "^1.7.0",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I added some new deps here, it's because they were being depended upon directly but were actually transitive deps before pnpm.

Comment on lines 4 to 6
// NOTE: use fs.realpathSync() in addition to path.resolve() to resolve
// symlinks to the real path. This is required for webpack plugins using
// `include: [...file path...]`.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mention how this is related to using pnpm?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still not 100% sure if this is the greatest idea. I worry we'll need fixes like this all over the place.

Would be better if we found a fix specifically to help webpack work with symlinks, instead of us having to do things like this to workaround webpack not working with symlinks...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gregmagolan Wdyt?

Comment on lines +235 to +238
fallback: {
path: require.resolve('path-browserify'),
util: require.resolve('util/'),
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not clear to be why I had to add these for pnpm.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "fallback" do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something to do with redirecting imports if it's not found, which is useful for browserified node libraries (I think).

@kormide
Copy link
Collaborator Author

kormide commented Nov 9, 2022

I can't approve since I'm a PR author, but maybe @gregmagolan should take a look anyway.

@jbedard jbedard merged commit b8371fe into pnpm Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants