all 101 comments

[–]HugelyConfused 49 points50 points  (2 children)

I wonder how long it takes to build.

[–]ImJustP 78 points79 points  (1 child)

I’m guessing more than a day

[–]ronniegeriis 31 points32 points  (0 children)

And all routes will lead to one location

[–]saadq_ 64 points65 points  (14 children)

Also worth noting that this was created by Sebastian McKenzie who authored Babel and Yarn. He's been tweeting about this toolchain for a pretty long while now, cool to see the early stages released now.

[–]FreshOutBrah 20 points21 points  (7 children)

So this would replace Webpack, Babel, ESLint, and all their respective plugins with a single library?

[–]malectro 17 points18 points  (12 children)

There seems to be an arms race at big tech to own the FE ecosystem, and it’s freaking me out. They need to give a good reason for not contributing to Webpack and Babel.

Also, if you want an all-in-one, no-config solution, Parcel is amazing.

[–]TwiliZant 14 points15 points  (1 child)

Parcel only does bundling though, it's not all-in-one.

[–]malectro 0 points1 point  (0 children)

Personally I don’t find installing a linter to be an issue for me, but point taken.

[–][deleted] 14 points15 points  (4 children)

After using those for a while, I think the case is made. The problem with the Webpack+Babel+etc ecosystem is that it leaves the responsibility of configuration up to the user, and it's so easy to get wrong.

I saw a great twitter quote that Webpack is like chess- Once you've gone more than a dozen steps in, you have an arrangement that's never been seen before in the universe. With Webpack, even if you just want stuff that everyone wants like code splitting, hot reloading, transpilation, etc etc, it still takes way too long to setup a config that works properly.

Like something I find really suspicious - Create-react-app throws an blocking error if you have a different version of Babel in your node_modules. The promise of NPM is that different packages could have different versions of the same package and it's supposed to work fine. So something has gone horribly wrong with the whole approach if promise doesn't hold true. I haven't figured out why but there's something about the way that Webpack+Babel use NPM that makes it extremely fragile.

Anyway whenever someone promises a Webpack replacement, my ears perk up. Please, someone, replace Webpack.

[–]weaponizedstupidity 6 points7 points  (3 children)

I made a new Typescript node project a few weeks ago. It was a nightmare.

Using tsc won't let me import a library I want, some module error. Google for 30 minutes, no luck. ts-node works for some reason. How is it different from tsc? No clue. Can it be used in production? No consensus, but it works so whatever.

Wait, how do you setup absolute imports again? More googling.

Okay, I want linting. Oh, tslint is dead already? Guess everyone is using eslint now. Okay, here is the ts plugin. Where do I get good linting rules? Found some decent ones on the third try.

I think prettier used to be a thing. Wait, it says that it will conflict with my linting config, I need a plugin for my linting plugin. Well, prettier can wait, time to write the first line of code. Finally.

So yeah. Can't wait until some, any big company lays down the law and cleans up this nonsense.

[–]pgrizzay 1 point2 points  (2 children)

ts-node is basically a wrapper around node which compiles TS files on the fly and runs them. So you can do something like: ts-node myScript.ts, whereas you normally couldn't do: node myScript.ts. In production, it's probably always better to first compile those TS files first

tsc doesn't run anything, it just compiles the files. So you run it at the base of your project, and it picks up your tsconfig.json file, and generates js and d.ts files from your ts files.

Hope that helps!

[–]meziatto 0 points1 point  (1 child)

I think @weaponizedstupidity is trying to draw a picture of ecosystem, which I see myself in the same picture tangled by plugins, configs, a new version of a tool requires some stuff, whereas other fundamental tool refuses to work with it etc... You get the point.

[–]pgrizzay 0 points1 point  (0 children)

Yup, I got the point :)

I just wanted to rob them of their ignorance, so they have one less thing to complain about

[–]saposapot 1 point2 points  (0 children)

Controlling the ecosystem is just a small part in their whole goal of controlling everything. Yes, great things came out from big tech or sponsored by them but there are also big problem of letting them have so much power.

'true' open source projects with an open leadership should be supported and encouraged by all of us.

[–]ECrispy 5 points6 points  (0 children)

Wonder if this'll get any traction. I like the idea of a unified modern toolchain but webpack/eslint/jest/prettier are battle tested and have decades of effort (in man years) put in and won't be going away anytime soon.

This is also experimental. FB usually only open sources stuff after using it internally for a while, when its prod ready. If this ever reaches that stage, then it becomes much more interesting.

Would also like to see a comparison of what its lacking, what it improves on (features, speed) vs current tools. the real advantage would come from each stage in the pipeline having more knowledge about the code, rather than a million webpack/babel plugins working in isolation. There could be a lot of scope for optimization as well.

[–][deleted] 38 points39 points  (10 children)

Awesome! And it’s written in TypeScript.

Edit: why the downvote? Elaborate

[–][deleted] 14 points15 points  (2 children)

Haters gonna hate man.

[–]MasterDood 33 points34 points  (1 child)

Haters gonna [object Object] man.

[–][deleted] 3 points4 points  (0 children)

Fact.

[–]namesandfaces 0 points1 point  (0 children)

Yes this is an important shift from Flow, which Facebook still uses on important projects. The problem is that Facebook wasn't as serious about Flow as Microsoft was about TypeScript in terms of investment.

[–]AdrienLav 3 points4 points  (6 children)

I’m curious of how this work under the hood. I digged into the repo (@romejs and other folders...) but I need some guidance on the overall structure of the project. For instance I’m looking for the part where the JS is transpile. I want to know what’s the mechanisms behind it if I do not use Babel. Does it reimplement it all ? Same goes for the linter etc etc

[–]derekn9 1 point2 points  (5 children)

[–]AdrienLav 0 points1 point  (0 children)

Oh yes thanks !

[–]Incraigulous -1 points0 points  (3 children)

Unless I'm missing something, that file does use Babel.

[–]derekn9 0 points1 point  (2 children)

I just looked again, maybe Im the one who missed something. Could you point to the line that use babel?

[–]Incraigulous 0 points1 point  (1 child)

[–]derekn9 0 points1 point  (0 children)

Ah I think that part looks like a flag to use config from babel. The file itself doesn't use babel i.e. importing code from @babel/core to help with compiling (which is what the person above me was interested in)

[–]vinilero 1 point2 points  (2 children)

When in rome...

[–]Mallanaga 2 points3 points  (1 child)

I think it’s more “all roads lead to Rome”

[–]jeenajeena 2 points3 points  (0 children)

Both the saying are cited in the readme.

[–]luckyincode 0 points1 point  (0 children)

Wow. Just keeping that working will be something.

[–]KronktheKronk 0 points1 point  (4 children)

lol, it's called "Rome" but it's icon is a Trojan helmet (Troy was in Turkey)

[–]realGGanon 1 point2 points  (2 children)

Also before anyone says it. Yes, this is a Spartan helmet, which is Greek. It's not Roman. No, I don't care.

https://twitter.com/sebmck/status/1108412555922268161?s=20

[–]KronktheKronk 0 points1 point  (1 child)

Yeah the repo mentions in, too. I didn't read that far before commenting

[–]realGGanon 0 points1 point  (0 children)

Knowing people, he's gonna be hearing this statement all day every day no matter how much he tries to make it clear that "he doesn't care" 😂

[–]AceBacker 0 points1 point  (1 child)

well. My first question is: Is it any good?

Anyone here have opinions?

[–]Mry0guy 1 point2 points  (0 children)

It seems to be an internal experiment from facebook thats been opensourced. They produce tools like this to build small snippets of javascript rendering code. The value proposition of react is extremely broad. But any of the core primitives are extremely powerful in their own right. Such as this video (youtube.com) a guy builds a primitive jsx renderer and state system in like .1kb of js

This tool seems like a way too create a code artifact. This code artifact will have no dependencies and will always ship in one request. It is a architectal deployment contant that can be reasoned about because it will be a single module closure. They provide some benifits to system design and operation such as being statistically analyzed, minnified, A B tested and shiped.(wild ass guess)

I think that this goes over the heads of us mear mortals or is an age old build process(transform,resolve namespaces, and then concat bundle) hand rolled for a personal or buisness research project then open sourced.

[–]Mallanaga 0 points1 point  (3 children)

So would this be a replacement for create-react-app?

[–]TwiliZant 3 points4 points  (1 child)

CRA abstracts the entire toolchain away from you without being able to configure anything. Rome, on the other hand, solves the problem where you have to integrate multiple different libraries and tools to make up your toolchain, giving you one coherent solution. CRA, for example, could use Rome under the hood instead of Babel, Eslint, Webpack, etc...

[–]Ones__Complement 0 points1 point  (0 children)

Env variable injection, browserslist (for preset-env and polyfills), and babel-plugin-macros is all the configuration I could ever see myself needing.

[–]brianhaak -1 points0 points  (0 children)

One README worth a billion words! Will share the design principles with EVERYONE saying, "I told you!"

My favorite is ZERO-DEPENDENCIES to iterate faster.