Hi I think there's a problem with the release.
yarnpkg
CDN source that you've already fixed here in GitHub (three years ogo)yarn add --dev style-inject
gets you this version
https://registry.yarnpkg.com/style-inject/-/style-inject-0.3.0.tgz#d21c477affec91811cc82355832a700d22bf8dd3
function styleInject(css, ref) {
if ( ref === void 0 ) ref = {};
var insertAt = ref.insertAt;
This has the issue of ref.insertAt
can be an uncaught inexistant property, which I see you've fixed already in the current GitHub version.
yarn add --dev https://github.com/egoist/style-inject.git
gets you also v0.3.0 but it's source is different;
export default function styleInject(css, { insertAt } = {}) {
if (!css || typeof document === 'undefined') return
So basically yarn add --dev style-inject
or yarn add --dev rollup-plugin-postcss
gets the user an old version of the code which in my case failed Closure Compiler tests (I'll submit another issue about that shortly).
I also checked other repos and they have the same difference.
https://www.jsdelivr.com/package/npm/style-inject
https://registry.npmjs.org/style-inject/-/style-inject-0.3.0.tgz
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too