Add svg support
This commit is contained in:
parent
00d253c487
commit
d35506112b
5 changed files with 23 additions and 3 deletions
4
Dashboard/assets/assets.d.ts
vendored
Normal file
4
Dashboard/assets/assets.d.ts
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
declare module "*.svg" {
|
||||
const content: any;
|
||||
export default content;
|
||||
}
|
|
@ -84,6 +84,7 @@
|
|||
"eslint-plugin-jsx-a11y": "^6.4.1",
|
||||
"eslint-plugin-react": "^7.24.0",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"file-loader": "^6.2.0",
|
||||
"fork-ts-checker-webpack-plugin": "^6.2.12",
|
||||
"html-webpack-plugin": "^4.3.0",
|
||||
"style-loader": "^1.2.1",
|
||||
|
|
|
@ -22,6 +22,6 @@
|
|||
"resolveJsonModule": true,
|
||||
"allowJs": true
|
||||
},
|
||||
"include": ["src"],
|
||||
"include": ["src", "assets/assets.d.ts"],
|
||||
"exclude": ["src/electron.js"]
|
||||
}
|
||||
|
|
|
@ -45,8 +45,15 @@ module.exports = (env, argv) => {
|
|||
use: ["style-loader", "css-loader"],
|
||||
},
|
||||
{
|
||||
test: /\.(jpg|jpeg|png|gif|mp3|svg)$/,
|
||||
use: ["file-loader"],
|
||||
test: /\.(png|jp(e*)g|svg|gif)$/,
|
||||
use: [
|
||||
{
|
||||
loader: "file-loader",
|
||||
options: {
|
||||
name: "assets/[hash]-[name].[ext]",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -3758,6 +3758,14 @@ file-entry-cache@^6.0.1:
|
|||
dependencies:
|
||||
flat-cache "^3.0.4"
|
||||
|
||||
file-loader@^6.2.0:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.2.0.tgz#baef7cf8e1840df325e4390b4484879480eebe4d"
|
||||
integrity sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==
|
||||
dependencies:
|
||||
loader-utils "^2.0.0"
|
||||
schema-utils "^3.0.0"
|
||||
|
||||
file-uri-to-path@1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd"
|
||||
|
|
Reference in a new issue