rollup-plugin-postcss
rollup-plugin-postcss copied to clipboard
anyway to external styleInject function to prevent the duplicate?
@lili21 I have the same issue. The style-inject
package using wrong relative path! As shown below~
I hope it can become like this. or anyway to external it, please~
var styleInject = require('style-inject/dist/style-inject.es.js');
It also not work~
Probably a bit late but I dealt with the same issues while trying to build a precompiled library excluding the css injection part. it is possible to override the code output by setting up a inject parameter function:
postcss({
...,
inject(cssVariableName) {
return `import styleInject from 'style-inject';\nstyleInject(${cssVariableName});`;
}
})
hope it helps to anyone trying to find a workaround.