-
Notifications
You must be signed in to change notification settings - Fork 7
use copy-webpack-plugin to deliver all static assets #37
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
Conversation
… with the dev server, so strings should finally be localized there!
Need to confirm this works in a monorepo... Edit: |
Later on, we should create a PsuedoLocalizationPlugin to use in the dev server. Some pkgs in core deliver psuedo-localized files, most dont. imo, we should just have our pkgs deliver the en translation and dev webpack server could psuedo-localize everything for the user |
Saw this issue, iTwin/itwinjs-core#406, which we might be able to close with this pr too. |
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.
Looks good overall, thanks for picking this up. We've been talking about making the change for a while.
I did leave a comment about still keeping all of the logic within the webpack plugin delivered via webpack-tools-core.
@aruniverse I like this idea. It'd make our packages smaller and avoid them being copied into production builds, which they are today. This should be fairly straightforward to do, let me see if I can quickly knock that implementation out. |
I haven't tried this yet, but there is a transform function that we might able to make use of. Ideally we would also flag the psuedo-localization too, so users can opt out of it |
Can confirm, can localize using the transform function.
|
* use CopyStaticAssetsPlugin from bentley/webpack-tools-core that uses copy-webpack-plugin under the hood to deliver all static assets. this also works with the dev server, so strings should finally be localized there! Co-authored-by: Arun George <[email protected]>
use copy-webpack-plugin to deliver all static assets.
this also works with the dev server, so strings should finally be localized there!