2

I added a .js file into my bower_components folder in my ember app. The file is included in my ember-cli-build.js like app.import('bower_components/script.js'). The app is working correctly on localhost but when i try to upload my app to heroku i got the error message no such file or directory script.

My question is where shall i put the script.js file? Shall i import it somewhere in my app?

2 Answers 2

5

bower_components folder is transient and is not good place for your file.

Move script.js to vendor folder

Sign up to request clarification or add additional context in comments.

Comments

3

This is covered in the documentation, under

Addons and Dependencies > Managing Dependencies > Other Assets


From the documentation

Other assets

Assets not available as an addon or Bower package should be placed in the vendor folder in your project.


So your script.js would go under vendor/. And then in your ember-cli-build.js file, you would do a app.import('vendor/script.js').

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.