Skip to content

mdx v2: import URL causes fail to compile error  #1802

@xHomu

Description

@xHomu

Subject of the issue

The import {URL} from 'url' line in recma-document plugin creates a compile error.

I don't think it's necessary to import the URL class since it's a global object?

Your environment

  • OS: Window 10 64bit
  • Packages: v.2.0.0.rc
  • Env: yarn v1.22.15 Next 11.0.1

Steps to reproduce

yarn build a nextjs project.

Expected behaviour

Project compiles.

Actual behaviour

Failed to compile due to error.

./node_modules/@mdx-js/mdx/lib/plugin/recma-document.js
Attempted import error: 'URL' is not exported from 'url' (imported as 'URL').

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions