-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 React as external config #15773
Fix React as external config #15773
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 56bb666:
|
Perf AnalysisNo significant results to display. All results
Perf Analysis (Fluent)Perf comparison
Perf tests with no regressions
|
Asset size changesUnable to find bundle size details for Baseline commit: 0229138 Possible causes
Recommendations
|
Thanks for doing this! We'll probably want to do it in the other packages as well--if you're interested I can explain how to do that now, or I can just handle it later. Looks like the build is failing because you're missing a change file--you'll need to run |
I think I'd be open to fixing the other package's configs as well. Is there any info/docs on how I can build the final assets that are published? Or should I look in the build pipelines somewhere? That way I can follow the 'steps to verify' in the PR description. I did include a change file but it was generated before the major refactor that happened recently. Should I remove that and regenerate it instead? |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
@filoxo can you please merge master and recreate a change file? 🐱 |
@layershifter done. |
Sorry for not following up on this sooner! To ensure this is fixed in all packages, I'd recommend making the change here instead (and revert the change in the packages/react webpack config): fluentui/scripts/webpack/webpack-resources.js Lines 207 to 210 in f55b5ce
There are a couple other places in that file which also have externals configs, but I don't think those are important to change since they're for specific scenarios where only the global version is needed. |
I tried regenerating the change file but the command returns with |
…bal variable (microsoft#15773)"" This reverts commit 8525756.
Pull request checklist
$ yarn change
Description of changes
As mentioned in the #10349, fluentui-react's build is configured to be able to use React as an external but only as a global. This change fixes that by using the proper config that will allow using external React as a global as well as with other methodologies (such as with SystemJS for in-browser module resolution).
Focus areas to test
require("React"),require("ReactDOM")
is no longer presentrequire("react"),require("react-dom")
is includedNotes
I wasn't able to find how to actually build the final bundle to be able to test these changes as I've described above.