example-typescript-package icon indicating copy to clipboard operation
example-typescript-package copied to clipboard

Configure webpack to process css and images

Open Shane32 opened this issue 4 years ago • 2 comments

I tried importing an image (added under src/images) to use with React, and after adding a images.d.ts file like this:

declare module '*.svg' {
    const content: any;
    export default content;
}

Then I was able to build. But the dist folders do not have the images in them, so it would seem that the relative links are now wrong. How can I configure webpack to include css/images? I know very little about webpack, sorry, and thanks for a great template! It would be great if you could update to this example with support for css/images. Thanks again!!

Shane32 avatar Nov 08 '21 00:11 Shane32

And jest won't run anymore because it tries to process the svg file

Shane32 avatar Nov 08 '21 00:11 Shane32

PR #5 fixes the jest issue.

Shane32 avatar Nov 08 '21 02:11 Shane32