Remove mainFields in webpack.config.js #3726
Merged
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.js
to use default settings of['browser', 'module', 'main']
and resolved issues withuuid
package 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 removedmodule
module
should be ES5 import/export, but they exposed it as ES.next import/exportmodule
to prevent ES.next leaked into our bundlewebpack.config.js
, we usedresolve.alias
to import Speech SDK, instead of relying on Speech SDK'spackage.json
package.json
,mainFields
options was not needed for Speech SDKmainFields
was introduced for Speech SDK and we moved toresolve.alias
, themainFields
seems obsoleteduuid
is only exposed when someone setmainFields
to prefermain
overmodule
As 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
module
field (using ES.next code). Web developer who use Web Chat NPM build should configure their build pipeline to either:main
field formicrosoft-cognitiveservices-speech-sdk
, ormicrosoft-cognitiveservices-speech-sdk
Specific Changes
webpack.config.js
and removemainFields
webpack.config.js
andcreateCognitiveServicesSpeechServicesPonyfillFactory.js
1.15.1
I have added tests and executed them locallyCHANGELOG.md
I 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.json
andpackage-lock.json
reviewedSecurity reviewed (no data URIs, check for nonce leak)Tests reviewed (coverage, legitimacy)