Skip to content

Commit

Permalink
Bumping major version as the webpack config changed (which may be bre…
Browse files Browse the repository at this point in the history
…aking)
  • Loading branch information
reZach committed Jul 20, 2022
1 parent e3e4c37 commit f101216
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
17 changes: 12 additions & 5 deletions app/src/pages/image/image.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import React from "react";

import img from "Images/testimage.png";
// https://stackoverflow.com/questions/59736269/electron-how-to-resolve-css-url-in-prod

class Image extends React.Component {
render() {
return (
<React.Fragment>
<img src={img} />

</React.Fragment>
<section className="section">
<div className="container">
<h1 className="title is-1">Loading images</h1>
</div>
<div className="container mt-2">
This page is to demonstrate that we can load an image hosted from a
directory in our project.
</div>
<div className="container mt-2">
<img src={img} />
</div>
</section>
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "secure-electron-template",
"version": "19.0.1",
"version": "20.0.0",
"description": "The best way to build Electron apps with security in mind.",
"private": true,
"main": "app/electron/main.js",
Expand Down
15 changes: 10 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,19 @@ module.exports = {
},
// loads common image formats
{
test: /\.(eot|woff|woff2|ttf|svg|png|jpg|gif)$/,
test: /\.(svg|png|jpg|gif)$/,
include: [
path.resolve(__dirname, "resources/images")
],
generator: {
filename: 'assets/[hash][ext][query]'
},
type: "asset/resource"
type: "asset/inline"
},
// loads common font formats
{
test: /\.(eot|woff|woff2|ttf)$/,
include: [
path.resolve(__dirname, "resources/fonts")
],
type: "asset/inline"
}
]
},
Expand Down

0 comments on commit f101216

Please sign in to comment.