jonathantneal / flexibility

A JavaScript polyfill for Flexbox
https://jonathantneal.github.io/flexibility/
MIT License
4.33k stars 479 forks source link

Usage with npm and webpack #103

Open DasElias opened 3 years ago

DasElias commented 3 years ago

I want to use this library with NPM and webpack, but unfortunately, I don't know how to embed it. At the moment, I have the following JS code:

import 'flexibility';
import $ from 'jquery';

$(function() {
  flexibility(document.documentElement);
})

With this approach, I get the following runtime error: Uncaught ReferenceError: flexibility is not defined.

How is flexibility used correctly with NPM?