4 ms·
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 i
by jazoom 8y 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?
- petepete 8y agoI'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.
- jazoom 8y agoYou 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.