forked from trussworks/react-file-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
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
I-12947 node canvas #3
Merged
Merged
Conversation
This file contains 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
cameroncaci
added
enhancement
New feature or request
dependencies
Pull requests that update a dependency file
labels
May 29, 2024
cameroncaci
requested review from
deandreJones,
josiahzimmerman-caci and
echarris2
May 29, 2024 16:49
deandreJones
approved these changes
May 29, 2024
Ready for review |
deandreJones
approved these changes
May 29, 2024
josiahzimmerman-caci
approved these changes
May 30, 2024
Merged
cameroncaci
added a commit
that referenced
this pull request
May 31, 2024
This reverts commit a24219f.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
I-12947
Changes proposed in this pull request:
src/components/drivers/pdf-viewer.jsx
imports and uses the pdfjs librarytopLevelAwait
to production webpack configyarn install
will fail to properly build canvas with node-sass present, see snippet below. By replacing with Dart sass, yarn installs just fine again.Relevant Articles
node canvas issue
PDFJS worker disable ability removed in newer update
Warning
It is likely this might not function as intended as the JavaScript errors will not appear until runtime. JavaScript is pretty lenient when compiling, I adjusted
src/components/drivers/pdf-viewer.jsx
to use the correct import but we'll only know if it works at runtime or testingNote
With this PR, canvas is now present and compiles properly. Once released it should resolve the mymove issue. As for how it could break things, currently mymove can't even use the latest react file viewer release because of that missing module, so it'd be hard to cause more harm when it currently isn't working. I'm hoping if we push out a new release then mymove can pull it in, and then run our e2e tests which will verify successful or unsuccessful operation