-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[api-minor] Attempt to improve support for using the PDF.js builds with Vite #19733
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
[api-minor] Attempt to improve support for using the PDF.js builds with Vite #19733
Conversation
…th Vite Similar to Webpack there's apparently other bundlers that will not leave `import`-calls alone unless magic comments are used. Hence we extend the builder to also append `/* @vite-ignore */` comments to `import`-calls, in order to attempt to improve support for using the PDF.js builds together with Vite. This patch also renames `__non_webpack_import__` to `__raw_import__` since the functionality is no longer bundler-specific. ***PLEASE NOTE:*** This patch is provided as-is, and it does *not* mean that the PDF.js project can/will provide official support for Vite.
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/15fa058066e6b0a/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/15fa058066e6b0a/output.txt Total script time: 0.86 mins Published |
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/20011b242d969e1/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 2 Live output at: http://54.193.163.58:8877/ca4edb1bf11d431/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/20011b242d969e1/output.txt Total script time: 29.66 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/ca4edb1bf11d431/output.txt Total script time: 60.02 mins |
Looks good to me; thanks! |
@timvandermeij As always, thanks for the reviews! It might be a good idea to go back to our "usual" release schedule now (i.e. at the end of the month); would you have time to create a new release? |
Yes, I'll create a new release later today. |
Similar to Webpack there's apparently other bundlers that will not leave
import
-calls alone unless magic comments are used. Hence we extend the builder to also append/* @vite-ignore */
comments toimport
-calls, in order to attempt to improve support for using the PDF.js builds together with Vite.This patch also renames
__non_webpack_import__
to__raw_import__
since the functionality is no longer bundler-specific.PLEASE NOTE: This patch is provided as-is, and it does not mean that the PDF.js project can/will provide official support for Vite.