0
votes

I want to write an app in Angular Dart that is to be served only over local network, possibly never ever touching the internet. The problem I have is that some things rely on resources from the web, typically style imports e.g. for material components:

@import url(https://fonts.googleapis.com/css?family=Material+Icons);

In such a simple case, I can manually download the resources and change the import. However, I would have to examine all packages I use (and their dependencies) and check whether they also load resources from web. And if they did, I would have to change the code of the package to point to the manually downloaded files. This is infeasible because of the potentially vast number of packages to examine and also because the source code of a package would have to be changed.

Is it possible to automatically acquire all the resources and bundle them at build time?

2

2 Answers

1
votes

You can use npm/yarn to download the material-icons package, then load it into your HTML file (if you want to bundle it, check out aspen, not the version on pub because it's outdated.)

0
votes

You can just download those css files manually and include them in your style.css as local resources. Hope that helps.