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

Webpack build "require is not defined" #280

Closed
bjudson opened this issue Mar 4, 2019 · 4 comments
Closed

Webpack build "require is not defined" #280

bjudson opened this issue Mar 4, 2019 · 4 comments
Labels
🏗 area/tools This affects tooling 👀 no/external This makes more sense somewhere else

Comments

@bjudson
Copy link

bjudson commented Mar 4, 2019

Sorry if this is the wrong place to post this, but I'm having an issue with including this library in a project being bundled by Webpack for browser usage. The build completes without error, but on opening the app I get this error:

image

I assume I can fix this with some adjustment to the Webpack config, but I'm having trouble figuring out what exactly I need to change. It seems like vfile is assuming a node environment?

@bjudson
Copy link
Author

bjudson commented Mar 5, 2019

This was a webpack config issue in another project that is building my app (it's a plugin in a webview). The builder was adding path to Webpack externals, and it took me a bit to track that down. Got the author to fix it & now all is working.

@bjudson bjudson closed this as completed Mar 5, 2019
@stivaugoin
Copy link

@bjudson I have the same issue and i'm curious to know what the author did to fix the problem. Any hint for me?
Thanks!

@khou22
Copy link

khou22 commented Aug 22, 2023

@bjudson I have the same issue and i'm curious to know what the author did to fix the problem. Any hint for me? Thanks!

I'm also having a similar issue! Really curious to see how you fixed this. @stivaugoin did you have any luck?

@ChristianMurphy
Copy link
Member

This issue is several years outdated, new major releases of both react-markdown and webpack have come out since, this is no longer a good source of info.
Feel free to open a discussion with your question https://github.com/orgs/remarkjs/discussions, and when opening the discussion please consider the support recommendations https://github.com/remarkjs/.github/blob/main/support.md and document which versions of webpack/react-markdown you are using so others can offer more concrete advise.

@remarkjs remarkjs locked as resolved and limited conversation to collaborators Aug 23, 2023
@ChristianMurphy ChristianMurphy added 🏗 area/tools This affects tooling 👀 no/external This makes more sense somewhere else labels Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🏗 area/tools This affects tooling 👀 no/external This makes more sense somewhere else
Development

No branches or pull requests

4 participants