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

using with browserify #12

Closed
fionnbharra opened this issue Mar 21, 2015 · 4 comments
Closed

using with browserify #12

fionnbharra opened this issue Mar 21, 2015 · 4 comments

Comments

@fionnbharra
Copy link

I've installed textures using npm install textures --save-dev but when I try and require('textures'); it is returning as undefined.

@ohcrider
Copy link
Contributor

You can try this:)

main.js

var xx = require('./node_modules/textures/textures.js')
console.log(xx)

build bundle.js

browserify main.js > bundle.js

test.html

<html>
  <head>
  <script src="bundle.js"></script>
  </head>
  <body>
  </body>
</html>

It is working.
2015-03-22 19 27 32

@fionnbharra
Copy link
Author

Thanks, it's now working. I'm including like this -

var textures = require('textures/textures');

Is this a problem with browserify? Is it possible to change it so you can simply use require('textures');

@ohcrider
Copy link
Contributor

You can close this issue now

@fionnbharra
Copy link
Author

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants