0.8.31 • Published 6 months ago

@pandino/loader-configuration-dom v0.8.31

Weekly downloads
-
License
EPL-2.0
Repository
github
Last release
6 months ago

loader-configuration-dom

build-test license TypeScript

This package is a first-party default Pandino loader configuration.

Usage

Obtain the library from a CDN or NPM (@pandino/loader-configuration-dom). Import it, and provide it to the Pandino constructor argument.

import loaderConfiguration from 'https://unpkg.com/@pandino/loader-configuration-dom/dist/loader-configuration-dom.mjs';
import Pandino from 'https://unpkg.com/@pandino/pandino/dist/esm/pandino.mjs';

const pandino = new Pandino({
    ...loaderConfiguration,
    // other properties may go here
});

await pandino.init();
await pandino.start();

Behaviour

Determining the "base" URL for Activator file loading based on manifest file location:

  • if the manifest file's path starts with http, then the base path of the manifest URL's head (ending at the last /) will be used
  • in every other case it will take the Browser's location.origin, appends the value set in the ìndex.html's <base href="..."> (if present, otherwise will fall back to /)

and lastly append whatever path is set in the manifest's Bundle-Activator property.

Example:

index.html URLbase-hrefManifest file fetch() URLActivator path in ManifestCalculated JS URL
http://host.com-http://lib.to/bundle-manifest.json./bundle.mjshttp://lib.to/bundle.mjs
http://host.com/my-app-http://lib.to/bundle-manifest.json./bundle.mjshttp://lib.to/bundle.mjs
http://host.com-./bundle-manifest.json./bundle.mjshttp://host.com/bundle.mjs
http://host.com/my-app-./bundle-manifest.json./bundle.mjshttp://host.com/bundle.mjs
http://host.com/./bundle-manifest.json./bundle.mjshttp://host.com/bundle.mjs
http://host.com/my-app/my-app/./bundle-manifest.json./bundle.mjshttp://host.com/my-app/bundle.mjs
http://host.com/./deploy/bundle-manifest.json./bundle.mjshttp://host.com/deploy/bundle.mjs
http://host.com/my-app/./deploy/bundle-manifest.json./bundle.mjshttp://host.com/my-app/deploy/bundle.mjs

License

Eclipse Public License - v 2.0

0.8.30

6 months ago

0.8.31

6 months ago

0.8.29

10 months ago

0.8.28

10 months ago

0.8.25

1 year ago

0.8.24

1 year ago

0.8.27

1 year ago

0.8.26

1 year ago

0.8.23

1 year ago

0.8.22

1 year ago

0.8.20

1 year ago

0.8.19

2 years ago

0.8.18

2 years ago

0.8.17

2 years ago

0.8.16

2 years ago

0.8.15

2 years ago

0.8.14

2 years ago

0.8.13

2 years ago