From 6568161d88746bfe555b843a441e6107e1d2853a Mon Sep 17 00:00:00 2001 From: ThinLiquid Date: Tue, 17 Oct 2023 00:33:48 +0100 Subject: [PATCH] =?UTF-8?q?[=F0=9F=9A=91]=20Remove=20filer=20from=20bundle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 1 + src/apps/editor.ts | 4 +--- src/apps/files.ts | 3 +-- vite.config.js | 4 +--- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 685a6a4..6360138 100644 --- a/index.html +++ b/index.html @@ -6,6 +6,7 @@ Flow OS + \ No newline at end of file diff --git a/src/apps/editor.ts b/src/apps/editor.ts index 69cbd02..3a7c424 100644 --- a/src/apps/editor.ts +++ b/src/apps/editor.ts @@ -11,8 +11,6 @@ import 'prismjs/components/prism-typescript.js' import 'prismjs/components/prism-css.js' import { FlowWindow } from '../wm.ts' -import Filer from 'filer' - interface EditorConfig { path: string } @@ -24,7 +22,7 @@ export default class EditorApp implements App { version = '1.0.0' async open (data?: EditorConfig): Promise { - const fs = new Filer.FileSystem() + const fs = new (window as any).Filer.FileSystem() const win = (window as any).wm.createWindow({ title: this.name, diff --git a/src/apps/files.ts b/src/apps/files.ts index 2c49ad0..25c188b 100644 --- a/src/apps/files.ts +++ b/src/apps/files.ts @@ -4,7 +4,6 @@ import { App } from '../types.ts' import flow from '../flow.ts' import { FlowWindow } from '../wm.ts' -import Filer from 'filer' import { Stats } from 'fs' export default class FilesApp implements App { @@ -14,7 +13,7 @@ export default class FilesApp implements App { version = '1.0.0' async open (): Promise { - const fs = new Filer.FileSystem() + const fs = new (window as any).Filer.FileSystem() const win = (window as any).wm.createWindow({ title: this.name, diff --git a/vite.config.js b/vite.config.js index 1bf7d46..ff70d3f 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,10 +1,8 @@ import { defineConfig } from 'vite' import { nodePolyfills } from 'vite-plugin-node-polyfills' -import { viteRequire } from 'vite-require' export default defineConfig({ plugins: [ - nodePolyfills(), - viteRequire() + nodePolyfills() ] })