es-module-shims 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Because we are still using the native module loader the edge cases work out comp
|
|
|
29
29
|
Include ES Module Shims with a `async` attribute on the script, then include an import map and module scripts normally:
|
|
30
30
|
|
|
31
31
|
```html
|
|
32
|
-
<script async src="https://ga.jspm.io/npm:es-module-shims@2.1.
|
|
32
|
+
<script async src="https://ga.jspm.io/npm:es-module-shims@2.1.2/dist/es-module-shims.js"></script>
|
|
33
33
|
|
|
34
34
|
<!-- https://generator.jspm.io/#U2NhYGBkDM0rySzJSU1hKEpNTC5xMLTQM9Az0C1K1jMAAKFS5w0gAA -->
|
|
35
35
|
<script type="importmap">
|
|
@@ -565,7 +565,7 @@ Once enabled, the separate `es-module-shims-typescript.js` extension must be ava
|
|
|
565
565
|
Example:
|
|
566
566
|
|
|
567
567
|
```html
|
|
568
|
-
<script async src="https://ga.jspm.io/npm:es-module-shims@2.1.
|
|
568
|
+
<script async src="https://ga.jspm.io/npm:es-module-shims@2.1.2/dist/es-module-shims.js"></script>
|
|
569
569
|
<script type="esms-options">
|
|
570
570
|
{
|
|
571
571
|
"polyfillEnable": "all"
|
|
@@ -611,6 +611,7 @@ const worker = new Worker(getWorkerScriptURL('myEsModule.js'));
|
|
|
611
611
|
|
|
612
612
|
Provide a `esmsInitOptions` on the global scope before `es-module-shims` is loaded to configure various aspects of the module loading process:
|
|
613
613
|
|
|
614
|
+
* [polyfillEnable](#polyfill-enable)
|
|
614
615
|
* [enforceIntegrity](#enforce-integrity)
|
|
615
616
|
* [fetch](#fetch-hook)
|
|
616
617
|
* [mapOverrides](#overriding-import-map-entries)
|
|
@@ -699,17 +700,19 @@ DOM `load` events are fired for all `"module-shim"` scripts both for success and
|
|
|
699
700
|
|
|
700
701
|
The `polyfillEnable` option allows enabling polyfill features which are newer and would otherwise result in unnecessary polyfilling in modern browsers that haven't yet updated.
|
|
701
702
|
|
|
702
|
-
This options supports `"css-modules"`, `"json-modules"`, `"wasm-modules"`, `"wasm-module-sources"
|
|
703
|
+
This options supports `"css-modules"`, `"json-modules"`, `"wasm-modules"`, `"wasm-module-sources"`, `"wasm-module-instances"` and `"import-defer"`.
|
|
704
|
+
|
|
705
|
+
In adddition, the `"all"` option will enable all features and the `"latest"` option will implement the latest supported browser features (currently `"css-modules"` and `"json-modules"`).
|
|
703
706
|
|
|
704
707
|
```html
|
|
705
708
|
<script type="esms-options">
|
|
706
709
|
{
|
|
707
|
-
"polyfillEnable": ["
|
|
710
|
+
"polyfillEnable": ["latest", "typescript"]
|
|
708
711
|
}
|
|
709
712
|
</script>
|
|
710
713
|
```
|
|
711
714
|
|
|
712
|
-
The above is necessary to enable CSS modules and JSON modules.
|
|
715
|
+
The above is necessary to enable CSS modules and JSON modules alongside TypeScript type stripping support.
|
|
713
716
|
|
|
714
717
|
#### Baseline Support Analysis Opt-Out
|
|
715
718
|
|