-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix Webpack configuration to use the minified pdf.worker file #55743
Fix Webpack configuration to use the minified pdf.worker file #55743
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the follow up
➜ App git:(fix/55176-webpack-pdf-worker-import) ✗ npm run web
> [email protected] web
> ./scripts/set-pusher-suffix.sh && concurrently npm:web-proxy npm:web-server
./scripts/set-pusher-suffix.sh: line 12: export: `': not a valid identifier
./scripts/set-pusher-suffix.sh: line 12: export: `': not a valid identifier
./scripts/set-pusher-suffix.sh: line 12: export: `': not a valid identifier
./scripts/set-pusher-suffix.sh: line 12: export: `': not a valid identifier
./scripts/set-pusher-suffix.sh: line 12: export: `': not a valid identifier
Using PUSHER_DEV_SUFFIX from ../Web-Expensify/_config.local.php
Found suffix: af92d6ff2b084f97a62e927faf647483
Updating .env
[web-server]
[web-server] > [email protected] web-server
[web-server] > webpack-dev-server --open --config config/webpack/webpack.dev.ts
[web-server]
[web-proxy]
[web-proxy] > [email protected] web-proxy
[web-proxy] > ts-node web/proxy.ts
[web-proxy]
[web-proxy] Creating proxy with host: www.expensify.com for production API and staging.expensify.com for staging API
[web-proxy] Proxy server listening at http://localhost:9000
[web-server] [time-analytics-webpack-plugin]: meet one minimizer which is a function, Time Analytics plugin could not analyze such situration.
[web-server] <i> [webpack-dev-server] [HPM] Proxy created: /api,/staging,/chat-attachments,/receipts -> http://[::1]:9000
[web-server] (node:64904) [DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader
[web-server] (Use `node --trace-deprecation ...` to show where the warning was created)
[web-server] <i> [webpack-dev-server] Project is running at:
[web-server] <i> [webpack-dev-server] Server: https://dev.new.expensify.com:8082/
[web-server] <i> [webpack-dev-server] Loopback: https://127.0.0.1:8082/
[web-server] <w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Managed item /Users/vit/Expensidev isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
[web-server] <i> [webpack-dev-server] Content not from webpack is served from '/Users/vit/Expensidev/App/dist' directory
[web-server] <i> [webpack-dev-server] 404s will fallback to '/index.html'
[web-server] <i> [webpack-dev-middleware] wait until bundle finished: /
[web-server] This is not a desktop build, adding babel-plugin-annotate-react
[web-server] babel.config.js
[web-server] - api.version: 7.25.8
[web-server] - api.env: development
[web-server] - process.env.NODE_ENV: undefined
[web-server] - process.env.BABEL_ENV: undefined
[web-server] - running in: babel-loader
[web-server] [BABEL] Note: The code generator has deoptimised the styling of /Users/vit/Expensidev/App/assets/images/home-background--desktop.svg as it exceeds the max of 500KB.
[web-server] [BABEL] Note: The code generator has deoptimised the styling of undefined as it exceeds the max of 500KB.
[web-server]
[web-server] ┌── time-analytics-webpack-plugin
[web-server] │ Webpack compile takes 83180.9015 ms
[web-server] ├── Plugins
[web-server] │ Plugin HtmlWebpackPlugin takes 13.6168 ms
[web-server] │ Plugin IgnorePlugin takes 9.6393 ms
[web-server] │ Plugin CopyPlugin takes 103.7364 ms
[web-server] │ Plugin PreloadPlugin takes 0.0699 ms
[web-server] │ Plugin ProvidePlugin takes 0.0624 ms
[web-server] │ Plugin EnvironmentPlugin takes 2.1728 ms
[web-server] │ Plugin DefinePlugin takes 0.1860 ms
[web-server] │ Plugin CleanWebpackPlugin takes 2.1468 ms
[web-server] │ All plugins take 131.6303 ms
[web-server] ├── Loaders
[web-server] │ Loader babel-loader takes 57106.1607 ms
[web-server] │ Loader @pmmmwh/react-refresh-webpack-plugin takes 155866.6496 ms
[web-server] │ Loader @svgr/webpack takes 200257.2053 ms
[web-server] │ Loader style-loader takes 5.1389 ms
[web-server] │ All loaders take 413235.1545 ms
[web-server]
[web-server] (node:64904) [DEP_WEBPACK_STATS_WARNINGS_FILTER] DeprecationWarning: config.stats.warningsFilter is deprecated in favor of config.ignoreWarnings
[web-server] assets by path cmaps/ 1.11 MiB 169 assets
[web-server] assets by info 117 MiB [immutable]
[web-server] assets by chunk 3.34 MiB (auxiliary name: main) 28 assets
[web-server] assets by path *.js 114 MiB 13 assets
[web-server] assets by path fonts/ 3.25 MiB 17 assets
[web-server] assets by path sounds/*.mp3 104 KiB
[web-server] asset sounds/success.mp3 61.1 KiB [emitted] [from: assets/sounds/success.mp3] [copied]
[web-server] + 3 assets
[web-server] assets by path css/*.css 14.1 KiB
[web-server] asset css/AnnotationLayer.css 9.08 KiB [emitted] [from: node_modules/react-pdf/dist/esm/Page/AnnotationLayer.css] [copied]
[web-server] + 3 assets
[web-server] assets by path .well-known/ 4.28 KiB
[web-server] asset .well-known/apple-app-site-association 3.68 KiB [emitted] [from: .well-known/apple-app-site-association] [copied]
[web-server] asset .well-known/assetlinks.json 614 bytes [emitted] [from: .well-known/assetlinks.json] [copied]
[web-server] + 9 assets
[web-server] Entrypoint main 69.2 MiB (3.34 MiB) = runtime-4a8a4d80a77655814e63.bundle.js 51.6 KiB lottiePlayer-d95d5abaaca4ec1e3fe6.bundle.js 5.06 MiB vendors-454ff9779ee7a8631a3f.bundle.js 41.7 MiB main-5d78f2c7f71fd0260453.bundle.js 22.3 MiB 28 auxiliary assets
[web-server] orphan modules 325 KiB [orphan] 268 modules
[web-server] runtime modules 34.7 KiB 20 modules
[web-server] modules by path ./node_modules/ 19.5 MiB 3494 modules
[web-server] modules by path ./src/ 14.9 MiB 2246 modules
[web-server] modules by path ./assets/ 4.4 MiB (javascript) 3.34 MiB (asset)
[web-server] javascript modules 4.36 MiB 518 modules
[web-server] asset modules 46.1 KiB (javascript) 3.34 MiB (asset) 34 modules
[web-server] modules by mime type image/svg+xml 24.7 KiB
[web-server] data:image/svg+xml,%3Csvg width=%27.. 699 bytes [built] [code generated]
[web-server] data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27.. 271 bytes [built] [code generated]
[web-server] + 29 modules
[web-server] ./index.js 1.23 KiB [built] [code generated]
[web-server] ./wdyr.ts 1.7 KiB [built] [code generated]
[web-server] ./package.json 14.9 KiB [built] [code generated]
[web-server] ./config/proxyConfig.ts 1.25 KiB [built] [code generated]
[web-server]
[web-server] LOG from webpack.FileSystemInfo
[web-server] <w> Managed item /Users/vit/Expensidev isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)
[web-server] + 12 hidden lines
[web-server]
[web-server] 1 warning has detailed information that is not shown.
[web-server] Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
[web-server]
[web-server] webpack 5.94.0 compiled successfully in 83184 ms
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Can you help with the following steps?
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.90-0 🚀
|
Yes, I can.
@kavimuru, does it make sense? |
@rezkiy37 qa should just check the pdf works in safari |
@mountiny, you are right. I left other steps for QA 🤔 |
@kavimuru just check that the pdf attachments are showing correctly in mweb safari |
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.90-6 🚀
|
Explanation of Change
The PR fixes Webpack configuration to use the minified pdf.worker file and align it with the PDFThumbnail. #55421 (comment)
Fixed Issues
$ #55176
PROPOSAL: N/A
Tests
Screenshot
Offline tests
Same as tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop