←
Mustapha Aouas893 posts
Mustapha Aouas avatar

Mustapha Aouas

@TheAngularGuy

Senior Frontend engineer • Angular Lyon co-organizer • Tweeting web development tips daily 🚀

◷ Joined November 2014▧ 135 Photos and videos
Rspack avatar
⟳ Mustapha Aouas retweeted
Rspack@rspack_dev·24 Sep 2024

Rslib will soon support Module Federation. This allows a library to concurrently generate ESM, CJS, Module Federation, and DTS outputs in a single build. Libraries built with Rslib can not only be published to npm. They can also provide remote modules for use by MF consumers.

Post attachment
Mustapha Aouas avatar
Mustapha Aouas@TheAngularGuy·4 Nov 2022

If you need to create a deep copy of a value in JS, structuredClone is your tool. A standard utility from the ECMAScript specification that allows tou to easily clone complex data structures without relying on workarounds or third-party libraries #100daysofcode

Post attachment
Mustapha Aouas avatar
Mustapha Aouas@TheAngularGuy·3 Nov 2022

The isNaN global function converts the argument to a number then checks if the result is not a number whereas Number.isNaN does not convert the argument

Post attachment
Mustapha Aouas avatar
Mustapha Aouas@TheAngularGuy·2 Nov 2022

The image-rendering CSS property defines how the browser should render an image, in order to provide a smooth or crispy edges. You can see below an example of a 20px base64 qrcode scaled to 200px and the same image with two different values for the image-rendering

Post attachment
Mustapha Aouas avatar
Mustapha Aouas@TheAngularGuy·31 Oct 2022

Did you know that JSON.strigify takes 3 parameters? If the third parameter is a number, it determines how many space characters should be used for indenting. If it’s a string, that string becomes white-space. This is useful for formatting log messages in a human-friendly way 🚀

Post attachment
Mustapha Aouas avatar
Mustapha Aouas@TheAngularGuy·27 Oct 2022

When designing a page, there are many times when one class should have all of the styles of another class as well as its own unique styles. For these cases you can use @extend 👇

Post attachment