Skip to content

module.exports is missing #673

@vzaidman

Description

@vzaidman

I'm submitting a bug report

Webpack Version:
4.17.1 (latest)

Babel Core Version:
7.0.0 (latest)

Babel Loader Version:
8.0.2 (latest)

Please tell us about your environment:
Windows 10

Current behavior:

Just updated to babel 7. We have a "feature toggle" system that serves the right module for dynamic configs (so a in import a from 'a' can be changed dynamically).

After upgrading from 8.0.0-beta.4 to 8.0.2 i got the following error:
module.exports is no longer an object, but it is undefined and I cant assign to it.

I found out it started on 8.0.0-beta.6

image

Expected/desired behavior:

Like in the left image where it works.

Steps to reproduce

add a debugger to any file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions