You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I writing postcss plugin which produce extra asset (svg sprite) and need ability to write this asset to webpack's output file system. In 0.x versions of this loader it was feature when you can access loader object itself (webpack context property of postcss config). Using this, postcss plugins for instance can write assets directly to webpack compilation object, but it was removed. I suggest following:
Postcss plugin generate message with new type "asset"
If loader find such message it creates file in webpack compilation
Example
some-postcss-plugin.js
functionplugin(){return(tree,result)=>{// do stuff...result.messages.push({type: 'asset',file: 'sprite.svg',content: '<svg>...</svg>',
plugin
});}}
I writing postcss plugin which produce extra asset (svg sprite) and need ability to write this asset to webpack's output file system. In 0.x versions of this loader it was feature when you can access loader object itself (
webpack
context property of postcss config). Using this, postcss plugins for instance can write assets directly to webpack compilation object, but it was removed. I suggest following:Example
some-postcss-plugin.js
postcss-loader
I will be glad to make PR with this feature!
The text was updated successfully, but these errors were encountered: