<#17357 Javascript/Typescipt support> New discussi...
# github-notifications
q
#17357 Javascript/Typescipt support New discussion created by sureshjoshi High Level
prettier
is a
fmt
plugin, with
eslint
support on the way as a
fix
and/or
lint
plugin. This leaves us with the question(s) of transpiling/bundling and how they should work. The JS ecosystem is the wild west, with a new build system coming out ... monthly? So, the prospect of adding yet another tool to that mix doesn't give me the warm and fuzzies. What would Pants's "purpose" be in TS/JS support? Would the idea be to be: A) a replacement for stuff like
webpack
,
vite
,
esbuild
(yay Go),
swc
(yay Rust),
turbopack
(yay Rust again?), etc (to which I'm a giant 👎 ) - or, B) would it be to use those as plugins and facilitate their usage in a consistent matter, and maybe throw some dep inference + caching in for good measure, or C) Alternative/middleground The prospect of using Pants and migrating config from
vite
to yet another transpiler/builder (since the JS ecosystem is the wild west), is a non-starter for me. Notable Notes and Quotable Quotes from the Slack thread
I'd like to be able to use prettier, other tools the same way I do for my python tools (pants fmt).
I'd like to have something to use with npm/yarn/webpack to do dependency management and caching.
I definitely don't think its A. There's enough choice in the JS ecosystem without rebuilding the wheel here
• Thomas
...there's lots of language specific functionality built into the bundlers (often as plugins) ...
...I suspect it'll be a hard sell for front end engineering to switch away from that normal JS/TS tooling, at least until pants has proven itself...
I suspect pants only prove itself convincingly via B (ie running outside pants gives the same behaviour as running inside) or a relatively extensive A.
• Huon
I think the idea that Pants should not get in the way is a good one. As much as possible it should just run your tools for you, not prevent you from using your tools. Basically, you should feel ~comfortable in a --keep-sandboxes chroot even if you don't know Pants.
• John
The purpose should be: 1) provide a uniform interface, 2) ability to build a JS bundle and package it as an asset into a pex, 3) perf improvements where feasible
• Benjy
pantsbuild/pants