title: Outputting svgs to bundle with RollupJS using @rollup/plugin-image in a LitElement project
body: <p>I am using <code>@rollup/plugin-image</code> to help resolve svg imports in my LitElement project as recommended here: <a href="https://github.com/rollup/plugins" rel="nofollow noreferrer">https://github.com/rollup/plugins</a>. I also declared the '*.svg' module in custom.d.ts since I am using typescript.</p>
  
  <p>The issue is I don't know how to include SVG files in rollup's bundle output, which means my browser can't import those files later on and I see 401 errors in the console. To temporarily fix this I am just using an inline SVG tag wherever I need to see display an SVG in the render() function of my custom LitElement components. Please help me understand what I am missing.</p>
  
  <p>My current (simplified) rollup.config.js:</p>
  
  <pre><code>// other imports ... 
  import image from '@rollup/plugin-image';
  const extensions = ['.js', '.ts'];
  const commonPlugins = [
    json(),
    commonJS(),
    resolve({ module: true, jsnext: true, extensions }),
    postcss(),
    terser({ keep_classnames: true, keep_fnames: true }),
    **image(),** 
  ];
  const babelPlugins = [
     ...
  ];
  const babelInclude = [
     ...
  ];
  const es6Bundle = {
    input: ['src/bundle/index.es6.ts'],
    output: {
      dir: 'dist/bundle',
      entryFileNames: 'index.js',
      format: 'iife',
      sourcemap: true,
    },
    plugins: [
      babel({
        extensions,
        presets: [
          [
            '@babel/preset-env',
            {
              targets: '&gt;25%',
            },
          ],
          '@babel/typescript',
        ],
        plugins: babelPlugins,
        include: babelInclude,
      }),
      ...commonPlugins, // where image() gets included
    ],
  };
  
  export default [es6Bundle];
  </code></pre>
  
  <p>My output dir looks like this:
  <code>dist/bundle/wc/*bunch of web-component.js files*</code>
  and inside of <code>dist/bundle</code> there's index.js and index.js.map.</p>
  
  <p>I might be confusing different concepts here, and if so I apologize. This is my first time using rollup and litelement.</p>