WICG / webpackage

Web packaging format
Other
1.23k stars 117 forks source link

I want some of files in bundle be serverd external, does Web Bundle currently support this? #596

Open chenzx opened 4 years ago

chenzx commented 4 years ago

I'm writing a tech demo for AIoT scene: cloud server transfers a single-page web app in a bundle file(which i'm considering use Webpack tool to do this package work) to a edge-side gateway/broker, who then serve the web app to user's mobile phone.

My current requirements: some of files in bundle is already in my demo's runtime which is pre-installed in IoT devices, and some is very-BIG binary tensorflow.js model files which may be served via external URLs, i guess webpackage spec. can specify them as external?

jyasskin commented 4 years ago

The resources inside a bundle can refer to resources outside of the bundle just using those resources' URLs. There's been some discussion of blocking external access from bundles that are being loaded from offline URLs (like file:), but I don't think there's a reason to do that for bundles that were themselves loaded over the internet.

We've also talked a bit about "external" dependencies, which would be mentioned in the bundle's metadata, and if the bundle is actually a signed package, might have their versions included in the top-level signatures. I haven't thought much about what that should look like, and it doesn't sound like you need it.