Comments (4)
As part of the build step, I sort of feel like the best approach will be to use node to parse the HTML using JSDOM something like this:
const filePath = path.resolve(__dirname, `${theIndex.html}`)
const readInterface = readline.createInterface({
input: fs.createReadStream(`${filePath}`),
terminal: false
})
readInterface.forEach((line) => {
const { document } = (new JSDOM(line)).window
let el = document.querySelector('script')
...
}).catch(e => {
console.log(e)
}).finally(() => {
// magick
})
But obviously readLIne won't work all the time, so its just a preliminary sketch.
from tauri.
Well, maybe the approach we can use to make the monolith here is to mung the index.html, looking for JS files and just directly inlining them. Whether or not we'd need to actually destructure dynamicImports is something to look at too.
from tauri.
We are making some progress on the feature/iframe branch, it might be the best solution.
from tauri.
@lucasfernog - I think that the merge of features/no-server resolves this.
from tauri.
Related Issues (20)
- [feat] Add option to control compression mode and level for Linux bundles
- [feat] Integrate skia for UI processing on mobile/desktop apps in tauri 2.0 HOT 3
- [bug] Unhandled Promise Rejection: Scope not defined for URL HOT 2
- [bug] Tauri 2: iOS app's bundle identifier does not use tauri.conf.json HOT 5
- [bug] IOS Asset Validation error, missing storyboard? HOT 3
- [feat] Integrated browser engine configurable HOT 2
- [bug] app_data_dir directory is not created HOT 1
- [bug] Failed to set the http scope of plugins HOT 5
- [bug] There are problems with LogicalPosition and PhysicalPosition in v2 HOT 1
- [bug] pnpm/cargo tauri ios dev -> xcodebuild error: no destination and action build HOT 3
- #Please help me Nextjs fans, been getting this error in production but runs smoothly in development
- [bug] Unable to load custom URI scheme HOT 3
- [feat] an option to not create a start menu folder for nsis installer HOT 5
- [bug] There is an issue with the window dragging size in the v2 version. HOT 1
- [bug] thread 'main' has overflowed its stack (Windows 11 Tauri v2 beta) HOT 4
- [feat] Is it possible to add a window rounded corner configuration option to the tuari:windows configuration of the tuari.conf.json file? HOT 1
- [feat] Avoid calling `convertFileSrc` twice.
- [bug] FileDialogBuilder accepts non-existing files
- [bug] Building for Windows Fails as System User (e.g., on AWS EC2) HOT 1
- [bug] Build of default (Angular) template fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tauri.