2createStudio / postcss-sprites

Generate sprites from stylesheets.
MIT License
413 stars 50 forks source link

a lot of App hot update.. #93

Closed yangbin1994 closed 6 years ago

yangbin1994 commented 7 years ago
new webpack.LoaderOptionsPlugin({
            options: {
                postcss: [
                    postcssImport({
                        addDependencyTo: webpack
                    }),
                    autoprefixer(config.autoprefixer || {
                        browsers: [
                            '>1%',
                            'last 4 versions',
                            'Firefox ESR',
                            'not ie < 9', // React doesn't support IE8 anyway
                        ],
                    }),
                    postcssSprites({
                        retina: true,
                        verbose: true,
                        spritePath: '_cache',
                        spritesmith: {
                            algorithm: 'left-right',
                            padding: 1
                        },
                        filterBy: function (image) {
                            if (image.url.indexOf('ico/') === -1) {
                                return Promise.reject();
                            }
                            return Promise.resolve();
                        },
                    }),
                    ...(config.extraPostCSSPlugins ? config.extraPostCSSPlugins : []),
                ],
            },
        }),

yeye

vvasilev- commented 7 years ago

Hey @yangbin1994,

Thanks for the report. Could you prepare a sample project where I can reproduce the issue?

vvasilev- commented 6 years ago

See #94 for more information.