Skip to content

Commit 6e9a051

Browse files
fix not work on prod
1 parent 5ed3074 commit 6e9a051

File tree

855 files changed

+2584
-2479
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

855 files changed

+2584
-2479
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@
9090
"vue-console-feed": "^0.0.28",
9191
"vue-re-resizable": "6.9.19-beta.5",
9292
"vue-request": "2.0.0-rc.4",
93-
"vue-router": "^4.0.0"
93+
"vue-router": "^4.0.0",
94+
"path": "npm:path-cross"
9495
},
9596
"devDependencies": {
9697
"@babel/runtime": "^7.21.0",

quasar.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ module.exports = configure(function (/* ctx */) {
7171
process.env.GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN,
7272
...require("dotenv").config().parsed,
7373
},
74-
// rawDefine: {},
74+
rawDefine: {
75+
"process.platform": null,
76+
"process.version": JSON.stringify(process.version),
77+
},
7578
// ignorePublicFolder: true,
7679
// minify: false,
7780
// polyfillModulePreload: true,

src/assets/material-icon-theme/dist/getIcon.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ export interface Options {
1010
readonly language?: keyof (typeof MaterialIcons)["languageIds"]
1111
}
1212

13-
function getIconById(id: keyof typeof MaterialIcons.iconDefinitions): string {
14-
return (
15-
"/src/assets/material-icon-theme/" +
16-
MaterialIcons.iconDefinitions[id].iconPath
17-
)
13+
const icons = import.meta.glob("../icons/*.svg", { as: "url" })
14+
15+
async function getIconById(
16+
id: keyof typeof MaterialIcons.iconDefinitions
17+
): Promise<string> {
18+
return icons["../" + MaterialIcons.iconDefinitions[id].iconPath]().then(
19+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
20+
(res) => (res as any).default
21+
) as Promise<string>
1822
}
1923

2024
function getIconDefinitions({
@@ -108,7 +112,7 @@ function getIconDefinitions({
108112
}
109113
}
110114

111-
export default function getIcon(options: Options): string {
115+
export default function getIcon(options: Options): Promise<string> {
112116
const icon = getIconDefinitions(options)
113117

114118
if (icon in MaterialIcons.iconDefinitions)

0 commit comments

Comments
 (0)