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
Summary
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).
Hi I think there's a problem with the release.
yarnpkg
CDN source that you've already fixed here in GitHub (three years ogo)Different Code - Same v0.3.0 package
yarn add --dev style-inject
gets you this version https://registry.yarnpkg.com/style-inject/-/style-inject-0.3.0.tgz#d21c477affec91811cc82355832a700d22bf8dd3This 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;Summary
So basically
yarn add --dev style-inject
oryarn 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).More
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