Update sha256 import to be default import (#10468)
This should fix the "Failed to compile. ./node_modules/keycloak-js/dist/keycloak.mjs Can't import the named export 'sha256' from non EcmaScript module (only default export is available)" error. Closes #10314
This commit is contained in:
parent
0353f9d7ae
commit
c93fee0c68
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import base64 from 'base64-js';
|
import base64 from 'base64-js';
|
||||||
import { sha256 } from 'js-sha256';
|
import sha256 from 'js-sha256';
|
||||||
|
|
||||||
if (typeof Promise === 'undefined') {
|
if (typeof Promise === 'undefined') {
|
||||||
throw Error('Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.');
|
throw Error('Keycloak requires an environment that supports Promises. Make sure that you include the appropriate polyfill.');
|
||||||
|
|
Loading…
Reference in a new issue