3 ms·
It isn't really the fact that it is all in one file that is the problem for maintainability, imo, it is that all (html, js. css) are incorporated together into
by l30n4da5 5y ago
It isn't really the fact that it is all in one file that is the problem for maintainability, imo, it is that all (html, js. css) are incorporated together into a single unit, with no way of breaking it up.
Vue puts html, js, and css into the same file with their .vue files, and it works great, because they keep those things separate _within_ the file. Also, there is the ability to load each section from a separate file, as well, which works flawlessly.
- IshKebab 5y ago> and it works great It works okay, except that it makes all tooling much much more complicated because you have to deal with multi-language files, and the template is HTML so you get frequent type errors (TSX catches those at compile time).
- l30n4da5 5y ago> It works okay, except that it makes all tooling much much more complicated because you have to deal with multi-language files So load those files as external, single-language files. Problem solved.
- IshKebab 5y agoThat would be extremely gross and wouldn't even work in some cases. E.g. a Javascript linter may rely on actual files in actual paths. And you can't do that for IDEs so you'll have to do a ton of extra work to get them to work with it. Not worth it.