Remove mainFields in webpack.config.js#3726
Merged
compulim merged 3 commits intomicrosoft:masterfrom Feb 17, 2021
Merged
Conversation
corinagum
approved these changes
Feb 16, 2021
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changelog Entry
webpack.config.jsto use default settings of['browser', 'module', 'main']and resolved issues withuuidpackage in IE11, by @compulim in PR #3726Description
Note: this change will only modify our bundle build (a.k.a.
webchat*.js). It won't impact our NPM build.I have tested the build on IE11 with both DLJS and DLSpeech. And particularly in DLJS, tested most features, including Adaptive Cards and Markdown.
webpack.config.js, we addedmainFields: ['browser', 'main']['browser', 'module', 'main'], we removedmodulemoduleshould be ES5 import/export, but they exposed it as ES.next import/exportmoduleto prevent ES.next leaked into our bundlewebpack.config.js, we usedresolve.aliasto import Speech SDK, instead of relying on Speech SDK'spackage.jsonpackage.json,mainFieldsoptions was not needed for Speech SDKmainFieldswas introduced for Speech SDK and we moved toresolve.alias, themainFieldsseems obsoleteduuidis only exposed when someone setmainFieldsto prefermainovermoduleAs this change only affect our bundle build and not NPM build, web developers who use our NPM build should expect unchanged behavior.
This means, as Speech SDK was not correct on the usage of
modulefield (using ES.next code). Web developer who use Web Chat NPM build should configure their build pipeline to either:mainfield formicrosoft-cognitiveservices-speech-sdk, ormicrosoft-cognitiveservices-speech-sdkSpecific Changes
webpack.config.jsand removemainFieldswebpack.config.jsandcreateCognitiveServicesSpeechServicesPonyfillFactory.js1.15.1I have added tests and executed them locallyCHANGELOG.mdI have updated documentationReview Checklist
Accessibility reviewed (tab order, content readability, alt text, color contrast)CSS styles reviewed (minimal rules, noz-index)Documents reviewed (docs, samples, live demo)Internationalization reviewed (strings, unit formatting)package.jsonandpackage-lock.jsonreviewedSecurity reviewed (no data URIs, check for nonce leak)Tests reviewed (coverage, legitimacy)