-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Run in the browser without a bundler #2475
Comments
I'm always using webpack and I'm bundling the UMD files for the browser and it works without any problems.
Yes, because I'm handling all external dependencies as external which is the correct way to build a library like Web3. |
The point of the issue was not addressed. Web3.js is forcing the developer
to use a bundler. I'm saying that Web3.js should not force the developer to
use a bundler. For example, I should be able to use a UMD build anywhere,
including the browser, without bundling it. But the UMD build does not work
in the browser as is.
Am I misunderstanding, or is it true that Web3.js cannot be used in the
browser without further processing by a bundler? If that's true, why take
that ability away? Not everyone wants to or should use something like
webpack.
…On Fri, Mar 8, 2019, 6:48 AM Samuel Furter ***@***.***> wrote:
Closed #2475 <#2475>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2475 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGrSj0_DkOmegNMcGjm7xeT-3Ot7-pKIks5vUmojgaJpZM4bkuNV>
.
|
So, ...Is |
Description
I would like to run web3.js in the browser without using a bundler like rollup, webpack, or parcel. This used to be possible, but it looks like the
.min.js
distribution has been removed. That's fine I suppose, since there is anesm
and aumd
build...except that they don't work in the browser. I've been at this for a while, and I'm not inexperienced with modules and build processes. I'm trying to avoid bundlers, and I'm sure there are others like me. I don't think forcing webpack is a good idea, it's useful and a better DX to be able to load the library straight into the browser at times. Theesm
build has issues with Node.js dependencies that aren't easily ported to the browser. Theumd
build has issues with some of its dependencies as well...just load it in the browser from a static file server and you'll see what's happening.Expected behavior
Load a current version of web3.js in the browser without a bundler or complicated build process.
Actual behavior
Can't load a current version of web3.js in the browser without a bundler, it just doesn't work using any of the distribution files.
Steps to reproduce the behavior
Restrict yourself to not using webpack, rollup, parcel, or similar tools, and try to load web3.js into the browser.
Error Logs
Gists
Versions
The text was updated successfully, but these errors were encountered: