Should respect Style Inject insertAt option
Now, plugin calls styleInject without additional properties. Could you fix it?
What i see in rollup-plugin-postcss.cjs.js:
if (!shouldExtract && shouldInject) { output += '\nimport styleInject from '${styleInjectPath}';\nstyleInject(css${Object.keys(options.inject).length > 0 ? ',${JSON.stringify(options.inject)}' : ''});;
}`
Temp solution:
if (!shouldExtract && shouldInject) { output += '\nimport styleInject from '${styleInjectPath}';\nstyleInject(css${Object.keys(options.inject).length > 0 ? ',${JSON.stringify(options.inject)}' : ''}, {insertAt: ${options.styleInject.insertAt}});'; }
It's undocumented but you can actually pass options to styleInject like this:
postcss({
inject: { insertAt: 'top' }
})
It's undocumented but you can actually pass options to styleInject like this:
postcss({ inject: { insertAt: 'top' } })
it is actually here https://github.com/egoist/style-inject#options