4 ms·
Exactly, as when it comes to transpilers, it's unlikely that you can eat your own dog food anyway - as in, compiling/transpiling/whatevering webpack with webpac
by patates 6y ago
Exactly, as when it comes to transpilers, it's unlikely that you can eat your own dog food anyway - as in, compiling/transpiling/whatevering webpack with webpack for webpack development would make no sense as far as I can tell.
- numlock86 6y ago> compiling/transpiling/whatevering webpack with webpack for webpack development would make no sense as far as I can tell Isn't that the workflow when working with/on TypeScript? (substitute webpack with TypeScript)
- patates 6y agoIt does make sense with TypeScript as it's a language. It, however, does not make sense with "tooling" (IMHO - there may be of course obvious stuff I may be missing). Tooling may also use a transpiled language but again, I, as a developer who's very experienced with JS, don't see a big win there. Someone mentioned Flow + OCaml as a bad example and how it doesn't work out for them, but that's more than tooling. At that point you are not using tools written in other languages to build JS, you are just using other languages.
- de_keyboard 6y agoFlow failed because Microsoft enabled TypeScript by default in VS Code. It had nothing to do with OCaml in my opinion. However, TypeScript is now suffering from long compile-times because it targets JS. If it was implemented in a language with more control over threading etc. I think it could be faster.
- IshKebab 6y agoYeah and Typescript's type checker code is one 41k line file because if they split it into multiple files it will be slower. `tsc` is pretty great to be honest but it feels like the exception.
- capableweb 6y ago> compiling/transpiling/whatevering webpack with webpack for webpack development would make no sense as far as I can tell. Could you explain further why you think so? Dogfooding tooling and bootstrapping runtimes with themselves is a fairly common practice, at least for discovering issues, bugs and future features for your own project.
- patates 6y agoRuntimes, sure, but how do you dogfood tooling that transpiles JS to JS for frontend?
- capableweb 6y agoSupposedly since webpack is using JS, they would also benefit from using later features than what's available in NodeJS stable, so they can use webpack to transpile future ES versions to compatible code so it can run on more NodeJS versions. Then that those features can both be used for frontend or backend code matters less, as the new JS features are usually not geared to a specific environment but for JS as a whole.
- patates 6y agowebpack is web-oriented though. While what you are saying is right, for a project which aims to keep web as its focus, this would perhaps not be the best way forward. When we also look the the codebase, they are not using webpack for webpack development, and using commonjs imports instead. The "modern JS" part of webpack comes from Babel and Babel uses TS (though still in progress). So dogfooding here isn't used by major projects, and I think we can see a pattern. For a formatting tool, I would agree with you more, but again, for a tool, wouldn't the formatting of the code of the tool itself be a distraction? It may be or it may be not, it depends, but the benefits are less clear for tooling.