Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure webpack to process css and images #4

Open
Shane32 opened this issue Nov 8, 2021 · 2 comments
Open

Configure webpack to process css and images #4

Shane32 opened this issue Nov 8, 2021 · 2 comments

Comments

@Shane32
Copy link
Contributor

Shane32 commented Nov 8, 2021

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
Copy link
Contributor Author

Shane32 commented Nov 8, 2021

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

@Shane32
Copy link
Contributor Author

Shane32 commented Nov 8, 2021

PR #5 fixes the jest issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant