Я не могу использовать путь к изображению в файле s css в качестве фона для связующего пакета.
Моя конфигурация накопления выглядит следующим образом.
import typescript from 'rollup-plugin-typescript2';
import commonjs from 'rollup-plugin-commonjs';
import external from 'rollup-plugin-peer-deps-external';
import resolve from 'rollup-plugin-node-resolve';
import scss from 'rollup-plugin-scss';
import image from 'rollup-plugin-img'; // module solves image add in source
import pkg from './package.json';
export default {
input: 'src/index.tsx',
output: [
{
file: pkg.main,
format: 'cjs',
exports: 'named',
sourcemap: true,
},
{
file: pkg.module,
format: 'es',
exports: 'named',
sourcemap: true,
},
],
plugins: [
image({
extensions: /\.(png|jpg|jpeg|gif|svg)$/,
limit: 10000
}),
scss(),
external(),
resolve({
broswer: true
}),
typescript({
rollupCommonJSResolveHack: true,
exclude: '**/__tests__/**',
clean: true,
}),
commonjs({
include: ['node_modules/**'],
namedExports: {
'node_modules/react/react.js': ['Children', 'Component', 'PropTypes', 'createElement'],
'node_modules/react-dom/index.js': ['render'],
},
})
],
};
Я пытаюсь добавить изображение путь в s css.
.chipsComponent > div:last-child {
background: url("/assets/images/Close_Circle.svg") no-repeat;
background-size: cover;
height: 16px;
width: 16px;
float: right;
cursor: pointer;
}
в браузере добавляется путь к изображению, но накопительный пакет не обслуживает папку активов. Прикрепленный скриншот
Изображение должно отображаться в кружке Фишки (красный).
Я что-то пропустил в конфигурации накопительного пакета или s css использование образа не так? Заранее спасибо