As Choirbean noted, this is fundamentally a question of motivation. I don't think it's about making something more "exciting." That is, the secret is not in something extrinsic, which is what makes this such a challenging issue whether it be front-end development or really any topic.
I draw on Daniel Pink's TED Talk whenever I think about getting students to do something. The gist is that there are "three elements of true motivation -- autonomy, mastery, and purpose." The key to start is autonomy; students need that freedom of choice to get personally invested and be motivated by more than a grade.
I can speak to autonomy with front-end development based on a project I did this year. I assign two HTML/CSS assignments. For each, they can make anything they want the subject of their pages: a travel destination, a TV show, a sports team, anything. That was the key. They were so excited about describing something they loved that they were invested enough in the topic to work on the HTML/CSS.
The requirements of the first assignment were the following:
- DOCTYPE
- html tags
- head tags
- body tags
- title element
- header element
- paragraph element
- proper filename
- bonus: comment with HTML definition
As you can see, it was elementary. That way they had mastery of HTML basics (i.e. the DOM) and could then grow to build something more sophisticated and aesthetically pleasing. With the second, they had to include the following:
- table
- link to external website
- button
- two divs (with div IDs)
- list
- heading
- paragraph
- three images
- text not left-aligned
- two fonts
- three colors
- additional HTML feature
- additional CSS feature
Nowhere did I grade the subject matter of their sites. Rather, I focused on the skills they needed to demonstrate competency in and let them prove to me -- in whatever form they liked -- that they were indeed competent in them. That freedom, to me, made the difference in motivating students to want to complete this work.