const path = require('path'); const paths = require('./paths'); const SpritesmithPlugin = require('webpack-spritesmith'); module.exports = { mode: 'development', entry: { app: ['webpack-dev-server/client?http://0.0.0.0:3000', 'webpack/hot/only-dev-server'], }, plugins: [ new SpritesmithPlugin({ src: { cwd: path.resolve(paths.appSrc, 'styles/sprites/model-card'), glob: '*.png', }, target: { image: path.resolve(paths.appBuild, 'sprites/model-card-bg.png'), css: path.resolve(paths.appBuild, 'sprites/model-card-bg.css'), }, apiOptions: { cssImageRef: './model-card-bg.png', }, spritesmithOptions: { algorithm: 'top-down', }, }), ], };