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.
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 analias
inpackage.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
(OPTIONAL) Contribution
Code of Conduct