Robinfr / electron-react-typescript

Electron boilerplate with React, Redux, and TypeScript
MIT License
432 stars 85 forks source link

Assets #30

Closed davidmayr closed 4 years ago

davidmayr commented 4 years ago

Whats the best way to use assets in this Template?

Robinfr commented 4 years ago

Assets as in images? You can simply import static files as you would with normal modules since there is a loader setup in the Webpack config for most common image formats.

Example of an image can be found here: https://github.com/Robinfr/electron-react-typescript/blob/master/src/renderer/components/Counter.tsx

If you need different types of assets, you'll need to figure out which Webpack loaders there are available for that type of assets and set that up yourself.