Skip to content

Commit b0375a5

Browse files
committed
Fix build error
1 parent 3f6e919 commit b0375a5

19 files changed

+264
-210
lines changed

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,11 @@
3636
"lodash": "^4.17.21",
3737
"mark.js": "^8.11.1",
3838
"numeral": "^2.0.6",
39-
"svelte-portal": "^2.2.0",
4039
"svelte-windicss-preprocess": "^4.2.8",
4140
"tippy.js": "^6.3.7",
4241
"vite-imagetools": "^4.0.4",
4342
"webextension-polyfill": "^0.9.0",
4443
"windicss": "^3.5.6"
4544
},
4645
"type": "module"
47-
}
46+
}

src/components/ReportModal.svelte

-55
This file was deleted.

src/components/TxInfo/Changes.svelte

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<script>
44
import "./MoneyMove.svelte";
55
import NoResultsIcon from "~/entries/contentScript/assets/no-results.png";
6+
const NoResultsIconUrl = new URL(NoResultsIcon, import.meta.url).href;
67
78
export let data;
89
export let id;
@@ -26,7 +27,7 @@
2627
{:else}
2728
<img
2829
class="w-[84px] h-[84px] mx-auto"
29-
src={NoResultsIcon}
30+
src={NoResultsIconUrl}
3031
alt="no-results"
3132
/>
3233
{/if}

src/entries/contentScript/primary/App.svelte

-31
This file was deleted.

src/entries/contentScript/primary/main.ts

-9
This file was deleted.

src/entries/contentScript/views/TrxInfo.svelte

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import "~/components/TxInfo/User.svelte";
1717
import "~/components/TxInfo/MoneyMove.svelte";
1818
import "~/components/TxInfo/Changes.svelte";
19-
import "~/components/ReportModal.svelte";
2019
import "~/components/Footer.svelte";
2120
2221
export let hash;
@@ -62,7 +61,6 @@
6261
.then((response) => response.data);
6362
6463
const transactionInfo = get(response, "data");
65-
console.log("transactionInfo: ", transactionInfo);
6664
6765
if (isEmpty(transactionInfo)) {
6866
unknownTRX = true;

src/entries/options/App.normal.svelte

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<svelte:options tag="nimbus-options" />
2+
3+
<script lang="ts">
4+
</script>
5+
6+
<div>Options</div>
7+
8+
<style>
9+
</style>

src/entries/options/App.svelte

-17
This file was deleted.

src/entries/options/index.html

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<title>Options</title>
6-
</head>
7-
<body>
8-
<div id="app"></div>
9-
<script type="module" src="./main.ts"></script>
10-
</body>
11-
</html>
3+
4+
<head>
5+
<meta charset="UTF-8" />
6+
<title>Options</title>
7+
</head>
8+
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="./main.ts"></script>
12+
<nimbus-options />
13+
</body>
14+
15+
</html>

src/entries/options/main.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import App from "./App.svelte";
1+
import "./App.normal.svelte";
22

3-
new App({
4-
target: document.getElementById("app"),
5-
});
3+
// TODO: Maybe we can code this page using React
4+
5+
// new App({
6+
// target: document.getElementById("app"),
7+
// });

src/entries/popup/App.normal.svelte

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<svelte:options tag="nimbus-popup" />
2+
3+
<script lang="ts">
4+
let hello = "Thanh Le";
5+
</script>
6+
7+
<div>Hello {hello}</div>
8+
9+
<style>
10+
</style>

src/entries/popup/App.svelte

-17
This file was deleted.

src/entries/popup/index.html

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="UTF-8" />
5-
<title>Popup</title>
6-
</head>
7-
<body style="min-width: 100px">
8-
<div id="app"></div>
9-
<script type="module" src="./main.ts"></script>
10-
</body>
11-
</html>
3+
4+
<head>
5+
<meta charset="UTF-8" />
6+
<title>Popup</title>
7+
</head>
8+
9+
<body style="min-width: 100px">
10+
<div id="app"></div>
11+
<script type="module" src="./main.ts"></script>
12+
<nimbus-popup />
13+
</body>
14+
15+
</html>

src/entries/popup/main.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import App from "./App.svelte";
1+
import "./App.normal.svelte";
22

3-
new App({
4-
target: document.getElementById("app"),
5-
});
3+
// new App({
4+
// target: document.getElementById("app"),
5+
// });

src/lib/PageContent.svelte

-28
This file was deleted.

svelte.config.js

-7
This file was deleted.

vite.config.components.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { defineConfig } from "vite";
22
import { svelte } from "@sveltejs/vite-plugin-svelte";
33
import { windi } from "svelte-windicss-preprocess";
4-
import { imagetools } from "vite-imagetools";
54
import sveltePreprocess from "svelte-preprocess";
65
import path from "path";
76

@@ -35,6 +34,5 @@ export default defineConfig({
3534
},
3635
preprocess: [sveltePreprocess(), windi({})],
3736
}),
38-
imagetools(),
3937
],
4038
});

vite.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export default defineConfig(({ mode }) => {
1414
plugins: [
1515
svelte({
1616
preprocess: [sveltePreprocess(), windi({})],
17+
exclude: ["*.normal.svelte"],
1718
compilerOptions: {
1819
customElement: true,
1920
},

0 commit comments

Comments
 (0)