update: upgrade webpack to version 5 and cleanup a bit of renderer code
This commit is contained in:
parent
0e58f115b4
commit
657ec825ab
|
@ -1 +1,7 @@
|
|||
declare module '*.svelte';
|
||||
declare module '*.svelte' {
|
||||
class Component {
|
||||
public constructor(options: { target: HTMLElement });
|
||||
}
|
||||
|
||||
export = Component;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -96,8 +96,8 @@
|
|||
"svelte-loader": "^2.13.6",
|
||||
"ts-loader": "^8.0.14",
|
||||
"typescript": "^4.1.3",
|
||||
"webpack": "^4.44.2",
|
||||
"webpack-cli": "^3.3.12"
|
||||
"webpack": "^5.11.1",
|
||||
"webpack-cli": "^4.3.1"
|
||||
},
|
||||
"repository": "https://git.fuwafuwa.moe/Xymorot/RenaiApp",
|
||||
"bugs": "https://git.fuwafuwa.moe/Xymorot/RenaiApp/issues",
|
||||
|
|
|
@ -12,22 +12,14 @@ module.exports = {
|
|||
rules: [
|
||||
{
|
||||
test: /\.svelte$/,
|
||||
loader: [
|
||||
{
|
||||
loader: 'svelte-loader',
|
||||
},
|
||||
],
|
||||
loader: 'svelte-loader',
|
||||
},
|
||||
{
|
||||
test: /\.ts$/,
|
||||
loader: [
|
||||
{
|
||||
loader: 'ts-loader',
|
||||
options: {
|
||||
configFile: path.resolve('tsconfig.renderer.json'),
|
||||
},
|
||||
},
|
||||
],
|
||||
loader: 'ts-loader',
|
||||
options: {
|
||||
configFile: path.resolve('tsconfig.renderer.json'),
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.mjs$/,
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
// This file is required by the index.html file and will
|
||||
// be executed in the renderer process for that window.
|
||||
// All of the Node.js APIs are available in this process.
|
||||
|
||||
import App from './renderer/App.svelte';
|
||||
|
||||
((): void =>
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-return -- fix this together with the typescript support of svelte
|
||||
new App({
|
||||
target: document.querySelector('#app'),
|
||||
props: {
|
||||
// we'll learn about props later
|
||||
answer: 42,
|
||||
},
|
||||
}))();
|
||||
new App({
|
||||
target: document.querySelector('#app'),
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { t } from '../../services/utils';
|
||||
import Bttn from '../1-atoms/Bttn.svelte';
|
||||
import SvelteButton from '../1-atoms/SvelteButton.svelte';
|
||||
import { nhentaiSaveFavorites } from '../../services/api';
|
||||
|
||||
function handleClick() {
|
||||
|
@ -11,5 +11,5 @@
|
|||
<style></style>
|
||||
|
||||
<div class="nhentai-login">
|
||||
<Bttn on:click="{handleClick}">{ t('Save nhentai Favorites') }</Bttn>
|
||||
<SvelteButton on:click="{handleClick}">{ t('Save nhentai Favorites') }</SvelteButton>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue