Comments (4)
More info (or I think I'm outlining a basic howto...)
I figured out that the examples are meant to be integrated directly into whatever node project you've already got. So, instead of trying to access the browserify example via my already running node project, I accessed it directly (via the port number 9393 it spits out when you start it).
I again get the page with the "foo =" that never has anything follow it. What I do get that seems to be new is that (when I view source), I can click on the js src link in Firefox and see the j.s. in /browserify.js?traverse
from browserify.
Yet another follow on... assuming this stuff is working (and that there's just some bug in the 'foo' example), what's the next step?
The README notes that "during bundling the package.json of a module or base directory will be read for its name and main fields, which will be used unless those fields are defined in opts."
That implies I have to create a package.json for my modules. The project's package.json doesn't really seem to be what we're talking about. My guess would be that I'm going to do some juju involving listing paths in my server.js and then relist them on the client side, but I'm not sure. Suggestions?
from browserify.
There are two ways to load packages: npm-style with a package.json and recursive traversal style starting at a base dir and wrapping all the javascript and coffee files in it. The first example in the readme shows the base directory functionality and the second example shows how to wrap a module from npm so you can use it browser-side.
If you want to integrate some existing browser-side javascript files with browserify, you'll need to update them for node-style exports where you assign into the exports
object. After that just point the base option to browserify at your client source directory.
from browserify.
Examples work fine, however if someone does not get it working maybe they do the same mistake as I did at first: I opened index file instead of pointing my browser to http://localhost:9393. I hope it helps someone
from browserify.
Related Issues (20)
- Trouble with lzma HOT 1
- thank HOT 1
- Let's browserify `node:test` for any env or Node version HOT 1
- Browserfy does not working with compiled libraries HOT 2
- SyntaxError: Unexpected token (53:4) while parsing HOT 1
- [spam]
- Unexpected character '#' HOT 1
- visitor[(override || node.type)] is not a function
- Dump offending code when acorn complains about syntax error HOT 4
- querystring API considered legacy by npm HOT 1
- require fs-js in browser does not work after creating and including Bundle HOT 1
- TypeError: this.buffers[pos.buf].get is not a function
- ااااا HOT 1
- When using `pnpm`, a module that uses `Buffer.isBuffer` fails to bundle HOT 2
- Calling bundle file from react gives Syntax error: react_app_testing/src/HashBundle.js: Unexpected character '�' (1:0) HOT 7
- Archive this repository HOT 7
- Doc: Typescript support
- Hey Some one please help :- browserify error with webtorrent HOT 3
- Browserify + common-shakeify + Chart.js = infinite stack trace HOT 2
- ERROR in ./node_modules/ ... in ReactJs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browserify.