Skip to content

Backward compatible CJS default export #110

@fadedhero

Description

@fadedhero

Environment

node v18.17.1
defu v.6.1.2
nuxt 2.17.2

Reproduction

Any Nuxt2 project above version 2.17.1

Describe the bug

With Nuxt v2.17.1 the package webpack-dev-middleware has been pinned to "5.0.0". This has a peer dependency of webpack ^5.0.0.

With webpack5 comes named imports. I can see in version 6.0.0 that you switched to named imports. Apparantly there is still an issue in this package with named imports.

This is the error message I get in the console, when I start a nuxt2 project: defu_WEBPACK_IMPORTED_MODULE_3__ is not a function.

Which means there is still an import type error in the newer version.

Additional context

This seems not to happen however when I start the project in PS, but only through a cmd

Logs

No response

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