21 Matching Annotations
  1. Jun 2023
  2. May 2023
  3. Nov 2022
  4. Sep 2021
    1. Webpack 5 no longer polyfills Node.js core modules automatically which means if you use them in your code running in browsers or alike, you will have to install compatible modules from npm and include them yourself. Here is a list of polyfills webpack has used before webpack 5:
  5. Mar 2021
  6. Oct 2020
    1. Perhaps we should detect URLSearchParams objects differently (using duck typing detection instead of instanceof window.URLSearchParams, for example) but the solution isn't adding a specific polyfill to Axios (as it'd increase the bundle size and still won't work with other polyfills).
    2. Also, if you don't put that implementation of URLSearchParams in the global scope you're not using it as a polyfill but a ponyfill, and those are meant for your code, not for external dependencies.

      first sighting: ponyfill

    1. Sometimes we can’t implement a solution that’s fully spec-compliant, and in those cases using a polyfill might be the wrong answer. A polyfill would translate into telling the rest of the codebase that it’s okay to use the feature, that it’ll work just like in modern browsers, but it might not in edge cases.
    2. Polyfills are great for methods like String.prototype.trim because they allow you to use the methods on String instances.
    3. A ponyfill is almost the same as a polyfill, but not quite. Instead of patching functionality for older browsers, a ponyfill provides that functionality as a standalone module you can use.
    4. When it comes to ES6, a flurry of problems turn polyfills into ineffective vaccines. For one, you simply can’t polyfill language features, such as arrow functions, generators, async/await (ES7), rest and spread parameters, classes, modules, etc.
  7. Sep 2020
    1. Rollup is a tool that lets you write your application using ES6 modules, even though you can't publish those modules directly to your users, because native support is only just starting to land in browsers. Rollup compiles your modules into a format that all browsers _do_ understand—a single script file—by, essentially, concatenating files together (while reordering and renaming declarations to preserve scope).
  8. Dec 2019
    1. If your only reason for using Axios is backward compatibility, you don’t really need an HTTP library. Instead, you can use fetch() with a polyfill like this to implement similar functionality on web browsers that do not support fetch(). To begin using the fetch polyfill, install it via npm command: npm install whatwg-fetch --save
    1. If you need polyfills in your code, consider including core-js in your package.json. This is will configure @babel/present-env to automatically include polyfills based on usage.
  9. Oct 2019
  10. Sep 2019