Skip to content

Wrong ProvidePlugin of URLΒ #1096

@weareoutman

Description

@weareoutman

Describe the bug

The PR #1089 introduced ProvidePlugin for 'URL' from 'url', but URL is not included in node url module.

This causes a browser error of Q is not a constructor if any client code includes new URL(...)

Expected behavior

No error with client code new URL(...)

Current behavior

Error in browser

Possible solution

Remove the fallback settings of 'URL'.

Steps to reproduce

Edit: this is not reproducible any more, since they downgraded this plugin to an older version to workaround the issue.

  1. Open https://docs.port.io/
  2. Click the search bar at top-right
  3. An error reported in browser console.

Screenshots

Image

Context

Your Environment

  • Version used: 4.3.5
  • Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3):
  • Operating System and version (desktop or mobile):
  • Link to your project: https://github.com/port-labs/port-docs

Related issue: easyops-cn/docusaurus-search-local#500

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions