Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The polyfills in the browser environment is not working #1023

Open
2 of 3 tasks
chen201724 opened this issue Jul 9, 2024 · 1 comment
Open
2 of 3 tasks

[BUG] The polyfills in the browser environment is not working #1023

chen201724 opened this issue Jul 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@chen201724
Copy link

chen201724 commented Jul 9, 2024

What happened?

The file at https://github.com/PlasmoHQ/plasmo/blob/main/core/parcel-resolver/index.mjs contains polyfills for the browser environment, but the polyfill here does not take effect when there is node:path.

I found that plasmo depend on parcel, however I can solve this problem by declaring an alias in package.json when using parcel. But this method does not work in the plasmo project. Does anyone know how to solve this kind of problem?

Currently, the only solution I can think of is to independently build the package to solve it, but this is obviously not a good solution.

Version

Latest

What OS are you seeing the problem on?

MacOSX

What browsers are you seeing the problem on?

Chrome

Relevant log output

Steps to reproduce

pnpm create plasmo react-markdown-demo
cd react-markdown-demo
pnpm install react-markdown
pnpm run dev
// popup.tsx
import ReactMarkdown from "react-markdown"

function IndexPopup() {
  return (
    <div>
      <ReactMarkdown>Hello, World</ReactMarkdown>
    </div>
  )
}

export default IndexPopup

(OPTIONAL) Contribution

  • I would like to fix this BUG via a PR

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@chen201724 chen201724 added the bug Something isn't working label Jul 9, 2024
@JinliG
Copy link

JinliG commented Jul 17, 2024

@chen201724 same problem. See this #960,it seems that parcel needs an upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants