Javascript at trivago

Insights, experiences and learnings from trivago's tech teams.

Read Sponsoring Webpack

Sponsoring Webpack

For the past few years, Webpack has played a central and important role at trivago. We use it for handling SVG icons and to improve our startup time for the benefit of our users by loading resources on demand. We run a highly complicated build with plenty of custom plugins which perform all sorts of optimisations for us that no other tool would allow us to do. And because we truly love open source we’ve also open sourced our solution to speed up multi-compiler builds, which we rely on heavily to deliver ideal bundles to our users.

Read the whole article ›
Read A Large-Scale JavaScript Re-Learning Initiative

A Large-Scale JavaScript Re-Learning Initiative

Because our main application was getting ever more memory-hungry, our awesome JavaScript architecture team developed a modern, freakishly efficient component and rendering framework which we will open source and highlight in a series of future articles. In order to prove the framework's maturity, we wanted to roll it out to the trivago core application.

Read the whole article ›
Read How to export a JavaScript module to multiple formats

How to export a JavaScript module to multiple formats

When publishing a JavaScript library, we usually want to make it available to as many people as possible to maximize the library's usefulness and adoption. In that respect, it can be helpful to users to have the library available in their preferred module format - CommonJS, AMD, ES6, etc. This article shows how to use webpack to automatically export multiple formats without having to maintain them separately.

Read the whole article ›
Read Speeding up webpack performance with parallel builds

Speeding up webpack performance with parallel builds

When using webpack to build your assets, it's only a matter of time until you wish for targeted builds. Whether it's the output of the library you're working on (CJS, UMD, AMD, Var, etc.), or the specific feature set (IE8 support, no IE8 support). parallel-webpack can run those builds in parallel, thus making full use of the multi-core processing capabilities of modern devices.

Read the whole article ›
Read Risk-free Migration From Assetic to Webpack

Risk-free Migration From Assetic to Webpack

Learn how we introduced webpack to build our JavaScript assets. One of the main challenges was to run both Assetic and webpack in parallel for some time, in order to run tests and to make sure nothing was broken. This was achieved without any code or configuration duplication by developing a custom webpack loader which was tailored to our setup, and which makes use of transducers.

Read the whole article ›