Closed NXTaar closed 8 years ago
You need a single entry point so just combine your CSS files and pass them to the plugin.
Unfortunately i can't do that, because my components are independent, and they don't have a single entry point
I think that there is no way to get working this, because webpack will process your files independently.
Ok, thanks for help. Will try something other way
@NXTaar I have the same problem like you. https://github.com/YingshanDeng/polymer-generate-spritesheet And now do you have a solution ?
@YingshanDeng, You can use groupBy option to create a separate spritesheet per component.
Hello @vvasilev- what i need is generate all the component into one spritesheet. and it is my demo: https://github.com/YingshanDeng/polymer-generate-spritesheet but has some problem.
To combine all images into one sprite.png, you could try the following way:
1.Creating a mixin named "_sprites.scss" and writing all sprite related classes here
2.Extending the css classes mentioned above in your component's style file.
Here is my file structure
I'm using webpack
sidebar/icons.scss
dashboard-notifications-area/styles.scss
plugin configuration
When it compiles the output is like
It generates two different spritesheets for each
.scss
file, and obviously the second, overrides the first one, and i get in the sprite.png only the sprite forbubble.png
How to tell the plugin to merge all of it to one file, and don't create a new
sprite.png
per each.scss
file