5 ms·
You actually think 30 seconds is OK for 'compiling' a dynamic language? We might as well start using C++ in the browser if that's the kind of feedback loop we h
by HumanDrivenDev 9y ago
You actually think 30 seconds is OK for 'compiling' a dynamic language? We might as well start using C++ in the browser if that's the kind of feedback loop we have to deal with.
Browserify does it much more quickly.
- joshribakoff 9y agoBundler != compiler. With caching my babel webpack setup has 30s cold startup and <1s compile and reload for a huge huge code base Edit: I should say bundler != tranpiler. A bundler may or may not be implemented as a compiler. In the end it's just fancy concatenation and code generation, whereas a transpiler (going from one language to another) requires parsing to an AST
- iovrthoughtthis 9y agoThis is an on going thing. Transpilers are just a word invented to mean compiling one high level language into another. The thing is, compilers already to that. The "level" of the language is irrelevant, the fundamental concepts are the same. So compiler works.
- abritinthebay 9y agoTranspilers are a specific type of compiler. They are source-to-source between the same approximate abstraction level. It's been used this way since at least 1980 (eg: in 86-DOS there was TRANS.COM)
- deleted 9y ago[deleted]
- sakuronto 9y agoWhat? Most Webpack setups I've seen use UglifyJS or something similar, and those definitely build ASTs.
- abritinthebay 9y agoIn production builds, yes. Webpack is massively plugable - you could probably use it to build C++ if you wanted (tho.. why). So for web production builds minification plugins are used (Uglify is bundled, but Closure Compiler, etc can be used too). But there's nothing about webpack that requires an AST, it can use things that do tho.
- abritinthebay 9y agoA) no I don’t because it’s not “compiling” anything B) learn the meaning of things before you try to sound knowledgeable about them C) switching off Browserify sped up bundling by 200% on my development build and about 500% on my production build. You’re doing something wrong.
- asfdsfggtfd 9y agoTranspiling is a type of compiling.
- abritinthebay 9y agoYes, transpilers are source-to-source compilers. However bundlers aren't transpilers. They can use transpilers (ie, in webpack with babel-loader). But they aren't them.
- HumanDrivenDev 9y ago> You’re doing something wrong. Yeah I mean possibly, but I'm a programmer, not a javascript tool yak shaver. I want to get work done not learn the ins and outs of "webpack". Of other tools get me their more quickly and simply then I'm going to use them.
- realusername 9y agoOn a big project I use, the full compilation takes 20s but the watch part only takes 2s, so when you work, you only wait one time 20s, after that it's only 2s.
- baddox 9y agoThe other comment cited 30 seconds as an upper limit where it becomes clear that something bad is likely going on. The dynamic language tidbit is a red herring, since the compilation is from one language into a dynamic language, which does have some valid downsides but is widely accepted (including by yourself, if you’ve accepted Browserify). Moreover, the full build times are, at least in my experience with webpack starter packs for side projects and much larger webpack builds at work, only a cost you pay when deploying or setting up a dev environment for the first time. My local dev environments recompile only the parts of the codebase that they need to, and that usually happens quickly enough that it’s ready by the time I go to my browser and refresh.