5 ms·
Bundler != 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 !
by joshribakoff 9y ago
Bundler != 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.