the directory is getting served wrong in truffle and I can't figure out where to change it....

The terminal response is...

Couldn't find file at .//app/app.js.

My build file.......

module.exports = {
          build: {
            "index.html": "index.html",
            "app.js": [
            "app.css": [
            "images/": "images/"
          rpc: {
            host: "localhost",
            port: 8545

My index.html file .......

    <link href="./css/app.css" rel='stylesheet' type='text/css'>
    <script src="./javascripts/app.js"></script>

app.css is a bundle which contains "css/app.css" and could contain many other css files. The bundle app.css is a concat of each file. That way your bundle app.css is available at the root level href=". /app.css" Same thing for app.js

  • Great thanks! If I want to add other css files can I add it to the app.css list........ "app.css": [ "css/app.css" , "css/othercssfile.css" ], – ethereal Jan 19 '17 at 18:54
  • Exactly, put all your css files in the array [] and they will be merged by truffle into a unique file app.css before nodejs starts. – Greg Jeanmart Jan 19 '17 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.