Skip to main content

How to manage Webpack configurations

Configuring Webpack is quite easy but it may become more difficult if there are many environments and requirements. I’ve included Webpack in different projects recently and I would like to share with you an easy way to configure it. I’m sure there are many different ways to configure Webpack, maybe better, but I’m just going to compare two of them:

  • One file to rule them all
  • Extended configurations

Read More

Introduction to Node modules and ES Modules.

In one project I’m working on, we have migrated from a non-standard building tool to Webpack. This change has allow us to use a standard module system to import/export our code instead of the legacy builder we were using to just concatenate code.

Why is useful to use Javascript Modules?

Javascript modules are needed to maintain the principles of encapsulation and dependency.

As a project grows, it is useful to reuse pieces of software developed in isolation. When one of these pieces of software is brought into a project, a dependency between them is created. For example, many projects nowadays relay in some JS framework like Angular, ReactJS, VueJS or others. This concept is known as dependency.

When a dependency is created between these pieces of software it is of importance that no conflicts arise. This is known as encapsulation. Encapsulation is important because it isolates and guarantees that there won’t be any interference between different pieces of code.

Read More

Adrián G. is Stephen Fry proof thanks to caching by WP Super Cache