plasmo icon indicating copy to clipboard operation
plasmo copied to clipboard

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

Open chen201724 opened this issue 1 year ago • 2 comments

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

  • [X] I agree to follow this project's Code of Conduct
  • [X] I checked the current issues for duplicate problems.

chen201724 avatar Jul 09 '24 08:07 chen201724

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

JinliG avatar Jul 17 '24 07:07 JinliG

Any progress here?

seawatts avatar Oct 01 '24 17:10 seawatts