To avoid multiple versions of a package, you can manually maintain a resolutions section in your package.json. We recommend you...

This is a short overview of things that are required to upgrade a project from the Asset Pipeline to Webpacker...

Many mail clients do not support external style sheets. Some even require all styling inline, which means you'll have...

When we want to use our own (or bought) fonts in an application with Webpack(er), we have two options...

Webpacker is Rails' way of integrating Webpack, and version 4 has been released just a few days ago, allowing us...

github.com

See the attached link for a useful overview of modern (and classic) DOM API methods, like matches, contains, append, cssText...

makandra dev

This is a presentation from 2019-01-21. Summary We want to move away from jQuery in future projects

If your app does not need to support IE11, you can use most ES6 features without a build step. Just...

Rails ships with two separate build pipelines: Sprockets ("asset pipeline") and Webpacker. Webpacker has many more moving parts, but allows...

makandra Curriculum

When your code does not behave as expected, you can use a debugger statement ("breakpoint") at any point in your...

The Ace editor is a great enhancement when you want users to supply some kind of code (HTML, JavaScript, Ruby...

Accessing pseudo elements via JavaScript or jQuery is often painful/impossible. However, accessing their styles is fairly simple. Using getComputedStyle

api.jquery.com

jQuery's removeClass removes the given class string from an element collection. If you want to remove multiple/unknown classes matching...

github.com

This repository was created with the intention of helping developers master their concepts in JavaScript. It is not a requirement...

developers.google.com

Mobile Chrome and Safari support the "web share API" which allow you to use the native share functionality of an...

It is possible to access Rails config (for example secrets) from within your webpack bundles, thanks to rails-erb-loader...

Scrolling overflowing elements with JavaScript HTML elements with overflow-y: auto or overflow-y: scroll will get a scrollbar when...

Font Awesome 5 is a comprehensive solution for vector icons on your website. Originally, Font Awesome came as an icon...

github.com

Masonry is a famous library to dynamically arrange a grid of items that have different aspect ratio, like horizontal and...

A JavaScript error in an E2E test with Selenium will not cause your test to fail. This may cause you...

developer.mozilla.org

...HTML's accepts a single file. You can allow multiple files via . But sometimes, selecting multiple files is not enough...

At makandra, we've built a few gems over the years. Some of these are quite popular: spreewald (> 1M downloads...

Having a unique selector for an element is useful to later select it from JavaScript or to update a fragment...

makandra dev

Option 1: JSON dump In config/webpack/environment.js you can get inspect environment which includes all webpack config options set for the...