fix(simple-lock): mark @ckb-js-std/core as external to fix build error#773
Open
leothatguy wants to merge 1 commit intonervosnetwork:developfrom
Open
Conversation
|
@leothatguy is attempting to deploy a commit to the cryptape Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the simple-lock dApp contract build pipeline to avoid an esbuild module-resolution failure by treating @ckb-js-std/core as an external dependency during bundling.
Changes:
- Add
--external:@ckb-js-std/coreto theesbuildinvocation in the contract build script.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR resolves a build failure in the
simple-lockdApp whereesbuildwas unable to resolve the@ckb-js-std/coredependency. By marking this dependency as external in the build script, we allow the bundling process to complete successfully, as this core library is expected to be provided by the runtime environment or handled separately.Ticket Number
N/A
Changes Made
What was the issue?
Fix the build error encountered when running
pnpm build:✘ [ERROR] Could not resolve "@ckb-js-std/core"The Yarn Plug'n'Play manifest forbids importing "@ckb-js-std/core" here because it's not listed as a dependency of this packageWhat did you do?
Updated
scripts/build-contract.jsto include--external:@ckb-js-std/corein theesbuildarguments. This ensures thatesbuilddoes not attempt to bundle this package, resolving the "Could not resolve" error.Types of changes
Check List
Images
pnpm build)pnpm format, aslintscript was not present inpackage.json)