Does someone know how I can compile a truffle project with multiple .html files?
When I run „npm run build“ I only get an index.html, App.js and the compiled contracts..

Jun 7, 2018, 5:24 PM
thats because truffle use spa (single page app) no need many html, you may have many .js, that will be compiled to single .js
Jun 7, 2018, 6:13 PM
Hm, so i can’t compile multiple html? How are you handling navigation to other pages then?
I mean:
I have 4 html files that have a navigation going on between each other (index, player profile,..)
How can I compile this? 😕
Jun 7, 2018, 7:08 PM
If you forced to have many html. Just call: window.location=url/otherpage.html
Jun 8, 2018, 4:04 AM
Thanks for your answers 👍
When I deploy the compiled index.html and the app.js, my navigation doesn’t work - as it references to html files that aren’t there if I only upload the index and the app.js.
And yes, I am using the webpack bundle you can download on truffles website 👍
Then I developed the project within the webpack folders.
Now I‘d like to build it.
And that’s where it has to take care of multiple html files
Jun 8, 2018, 6:50 AM

© 2024 Draquery.com All rights reserved.