I'm trying to package filamentgroup/loadCSS using webpack 2 but I fail to do so. I'd like to get cssrelpreload.js executed in the browser so it preloads CSS files for browsers which do not support rel="preload".
I've tried using imports-loader and exports-loader to have window.loadCSS available for cssrelpreload.js but I'm unable configure it correctly.
I was able to get window available for loadCSS.js, but that doesn't help to get cssrelpreload.js executed correctly.
How would I need to configure webpack to get this packaged correctly?
Try the following code
import { loadCSS } from 'fg-loadcss';
loadCSS( 'style.css' );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With