Skip to content

ES6 Imports are not working as described #168

@chwzr

Description

@chwzr

When import Base64 Module ES6 Style:

import Base64 from 'crypto-js/enc-base64';

I got following error:

The requested module '../node_modules/crypto-js/enc-base64.js' does not provide an export named 'default'

and if I'm using this syntax:

import { Base64 } from 'crypto-js/enc-base64';

It says:

The requested module '../node_modules/crypto-js/enc-base64.js' does not provide an export named 'Base64'

I've also tried import * as Base64 from 'crypto-js/enc-base64' but with no luck:

TypeError: Cannot read property 'CryptoJS' of undefined

What I am doing wrong?
I need the enc-utf8 and enc-base64 modules in my code.

btw: importing full Library is also not working, with similar errors :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions