From f3ac6875ed20f37049f7b651a5018b438362c7bf Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Wed, 11 Sep 2024 14:18:03 +0200 Subject: [PATCH] Move back to relative paths because somehow the alternative is even worse --- svelte/rollup.config.js | 25 ++++++------------- svelte/src/file_viewer/FileStats.svelte | 2 +- svelte/src/file_viewer/TransferLimit.svelte | 2 +- svelte/src/file_viewer/viewers/Abuse.svelte | 6 ++--- svelte/src/file_viewer/viewers/Audio.svelte | 2 +- .../file_viewer/viewers/BandwidthUsage.svelte | 4 +-- svelte/src/file_viewer/viewers/File.svelte | 4 +-- .../file_viewer/viewers/FilePreview.svelte | 4 +-- svelte/src/file_viewer/viewers/Image.svelte | 2 +- .../src/file_viewer/viewers/RateLimit.svelte | 6 ++--- svelte/src/file_viewer/viewers/Torrent.svelte | 12 ++++----- svelte/src/file_viewer/viewers/Video.svelte | 2 +- svelte/src/file_viewer/viewers/Zip.svelte | 6 ++--- svelte/src/filesystem/FSNavigator.ts | 2 +- svelte/src/filesystem/Filesystem.svelte | 2 +- .../filesystem/filemanager/FileManager.svelte | 2 +- svelte/src/filesystem/viewers/Audio.svelte | 6 ++--- svelte/src/filesystem/viewers/File.svelte | 4 +-- .../src/filesystem/viewers/FilePreview.svelte | 4 +-- svelte/src/filesystem/viewers/Image.svelte | 2 +- svelte/src/filesystem/viewers/Torrent.svelte | 4 +-- svelte/src/filesystem/viewers/Zip.svelte | 4 +-- svelte/src/home_page/UploadLoginWall.svelte | 2 +- svelte/src/layout/SlowDown.svelte | 6 ++--- .../src/user_home/dashboard/CardFSHome.svelte | 12 ++++----- .../src/user_home/dashboard/CardUpload.svelte | 2 +- 26 files changed, 60 insertions(+), 69 deletions(-) diff --git a/svelte/rollup.config.js b/svelte/rollup.config.js index f831b35..73bc23c 100644 --- a/svelte/rollup.config.js +++ b/svelte/rollup.config.js @@ -5,7 +5,6 @@ import livereload from 'rollup-plugin-livereload'; import terser from '@rollup/plugin-terser'; import babel from '@rollup/plugin-babel' import typescript from '@rollup/plugin-typescript' -import includePaths from 'rollup-plugin-includepaths'; import { sveltePreprocess } from 'svelte-preprocess'; const production = !process.env.ROLLUP_WATCH; @@ -40,14 +39,13 @@ export default [ }), babel({ - extensions: [".js", ".ts", ".html", ".svelte"], + extensions: [".js", ".ts", ".svelte"], babelHelpers: "bundled", }), - // If you have external dependencies installed from - // npm, you'll most likely need these plugins. In - // some cases you'll need additional configuration - - // consult the documentation for details: + // If you have external dependencies installed from npm, you'll most + // likely need these plugins. In some cases you'll need additional + // configuration - consult the documentation for details: // https://github.com/rollup/plugins/tree/master/packages/commonjs resolve({ browser: true, @@ -60,23 +58,16 @@ export default [ compilerOptions: { lib: ["es2015", "dom"] }, verbatimModuleSyntax: true, }), - includePaths({ - paths: ["."], - }), - // In dev mode, call `npm run start` once - // the bundle has been generated - // !production && serve(), - - // Watch the `public` directory and refresh the - // browser on changes when not in production + // Watch the `public` directory and refresh the browser on changes when + // not in production !production && livereload({ watch: `${builddir}/${name}.*`, port: 5000 + index, }), - // If we're building for production (npm run build - // instead of npm run dev), minify + // If we're building for production (npm run build instead of npm run + // dev), minify production && terser(), ], watch: { diff --git a/svelte/src/file_viewer/FileStats.svelte b/svelte/src/file_viewer/FileStats.svelte index 784925c..27b36c5 100644 --- a/svelte/src/file_viewer/FileStats.svelte +++ b/svelte/src/file_viewer/FileStats.svelte @@ -1,6 +1,6 @@