tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
82.19k stars 2.47k forks source link

[feat] allow requiring js/css files from within the filesystem #5190

Closed Nowaaru closed 2 years ago

Nowaaru commented 2 years ago

Describe the problem

When I am making a TypeScript app, by default it is made as a shell with zero bloat; the app does nothing unless you take time to personalize it. In Electron, this is very easy as I'm allowed to require any file in the filesystem and put the results into some storage interface. In Tauri, however, there is no way to access any form of file in the filesystem. This turns modular applications into something that is very rough to implement without hacks.

Describe the solution you'd like

I would like to be able to require any file within the application's data folder / same folder that the executable is in. If this is not enough, then maybe a feature with scopes in tauri.conf.json.

Alternatives considered

One: Reading it from the file system and creating a Githubissues.

  • Githubissues is a development platform for aggregating issues.