Hacker News new | ask | show | jobs
by jazoom 2823 days ago
I've been doing that for years in one of my projects. Just reference the CSS and JS files in the .vue file (e.g. <script src='./file.js'></script>) instead of inlining them in their respective tags. How else would you want to do it?
1 comments

I'd just like a directory containing a template, style and code file, the referencing would be straightforward to imply without having to repeat everywhere. Similar to how views work in Rails I guess.
You want more magic, basically. I guess that's a personal choice.

I've never personally felt inconvenienced by having this at the bottom of my .vue files:

  <style src='./style.css'></style>
  <script src='./script.js'></script>
It's not like I ever have to type it out. It gets copied along with whatever else is in the .vue file I copied from.