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

requiring javascript from npm does not work #812

Closed
adamschoenemann opened this issue Jan 9, 2015 · 3 comments
Closed

requiring javascript from npm does not work #812

adamschoenemann opened this issue Jan 9, 2015 · 3 comments
Labels
Milestone

Comments

@adamschoenemann
Copy link

I may be using this incorrectly, but I cannot require the bootstrap javascript using require('bootstrap-sass').

Changing the main key in package.json to point to assets/javascripts/bootstrap.js, instead of the non-existent index.js appears to fix the issue.

@cvrebert cvrebert added the bug label Jan 12, 2015
@cvrebert
Copy link
Collaborator

Yeah, the current main value makes no sense.

@glebm glebm added this to the v3.3.2 milestone Jan 14, 2015
glebm added a commit that referenced this issue Jan 14, 2015
glebm added a commit that referenced this issue Jan 18, 2015
@glebm glebm closed this as completed in bcf9fcd Jan 19, 2015
@gitnik
Copy link

gitnik commented Oct 12, 2015

How would I require just a single file?

@cvrebert
Copy link
Collaborator

@gitnik Use require.resolve() and combine the result with the relative path to the file you want.

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

No branches or pull requests

4 participants