Skip to content

Commit 32c180c

Browse files
committed
add file-loader for svg
1 parent 2b96b1a commit 32c180c

File tree

6 files changed

+25
-14
lines changed

6 files changed

+25
-14
lines changed

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"core-js": "^3.21.1",
4343
"dotenv": "^16.0.0",
4444
"element-plus": "^2.2.16",
45+
"file-loader": "^6.2.0",
4546
"fs-extra": "^11.2.0",
4647
"http": "^0.0.1-security",
4748
"https": "^1.0.0",

quasar.conf.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,14 @@ module.exports = configure(function (ctx) {
251251
},
252252
],
253253
},
254-
254+
extendWebpack (cfg) {
255+
cfg.module.rules.push({
256+
test: /\.svg$/,
257+
use: [
258+
'file-loader'
259+
]
260+
})
261+
},
255262
// "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain
256263
chainWebpackMain(chain) {
257264
chain

src/components/nav-buttons/ExportMenu.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,9 +1131,9 @@ const createPackage = async(location: string) => {
11311131
str += `\n\t},`;
11321132
str += `\n\t"dependencies": {`;
11331133
str += `\n\t\t"vue": "^3.4.21",`;
1134-
str += `\n\t\t"vue-router": "^4.0.12",`;
1134+
str += `\n\t\t"vue-router": "^4.3.0",`;
11351135
str += `\n\t\t"pinia": "^2.1.7"`;
1136-
str += `,\n\t\t"element-plus": "^2.2.16"`;
1136+
str += `,\n\t\t"element-plus": "^2.6.2"`;
11371137
11381138
if (exportOauth.value === "on" || exportOauthGithub.value === "on") {
11391139
str += `,\n\t\t "firebase": "^9.6.9"`;
@@ -1142,8 +1142,8 @@ const createPackage = async(location: string) => {
11421142
str += `\n\t"devDependencies": {`;
11431143
str += `\n\t\t"@vitejs/plugin-vue": "^5.0.4",`;
11441144
str += `\n\t\t"eslint": "^8.5.0",`;
1145-
str += `\n\t\t"eslint-plugin-vue": "^8.2.0",`;
1146-
str += `\n\t\t"vite": "^5.2.0"`;
1145+
str += `\n\t\t"eslint-plugin-vue": "^9.24.0",`;
1146+
str += `\n\t\t"vite": "^5.2.6"`;
11471147
if (importTest.value === "on") {
11481148
str += `,\n\t\t"@babel/core": "^7.12.16",`;
11491149
str += `\n\t\t"@babel/eslint-parser": "^7.12.16",`;
@@ -1157,12 +1157,12 @@ const createPackage = async(location: string) => {
11571157
str += `\n\t\t"jest": "^27.0.5"`;
11581158
}
11591159
if (exportAsTypescript.value === "on") {
1160-
str += `,\n\t\t"@rushstack/eslint-patch": "^1.1.0",`;
1160+
str += `,\n\t\t"@rushstack/eslint-patch": "^1.8.0",`;
11611161
str += `\n\t\t"@vue/tsconfig": "^0.1.3",`;
1162-
str += `\n\t\t"typescript": "^5.2.2",`;
1163-
str += `\n\t\t"vue-tsc": "^2.0.6",`;
1164-
str += `\n\t\t"@types/node": "^16.11.25",`;
1165-
str += `\n\t\t"@vue/eslint-config-typescript": "^10.0.0"`;
1162+
str += `\n\t\t"typescript": "^5.4.3",`;
1163+
str += `\n\t\t"vue-tsc": "^2.0.7",`;
1164+
str += `\n\t\t"@types/node": "^20.11.30",`;
1165+
str += `\n\t\t"@vue/eslint-config-typescript": "^13.0.0"`;
11661166
}
11671167
str += `\n\t}\n}`;
11681168
// fs.writeFileSync(path.join(location, "package.json"), str);

src/components/nav-buttons/ExportMenuOptions.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,9 @@ test('renders ${componentName}', () => {
316316
return "";
317317
}
318318
},
319-
/**
320-
* @description creates the <router-link> boilerplate for /views/components
321-
* also creates the <template></template> tag for each component
319+
/*
320+
@description creates the <router-link> boilerplate for /views/components
321+
also creates the <template></template> tag for each component
322322
*/
323323
writeTemplate(componentName, children, routes) {
324324
let str = "";
@@ -382,6 +382,8 @@ test('renders ${componentName}', () => {
382382
} else {
383383
return `<template>\n<div>\n\t${str}${templateTagStr}${routeStr}\t</div>\n</template>`;
384384
}
385+
386+
-->
385387
},
386388
/*
387389
<!-- @description imports child components into <script> -->

src/utils/uploadImage.util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { ipcRenderer } = window;
55
const types = [
66
{
77
name: 'images',
8-
extensions: ['jpg', 'jpeg', 'png']
8+
extensions: ['jpg', 'jpeg', 'png', 'svg']
99
}
1010
]
1111

0 commit comments

Comments
 (0)