-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compatibility with import-map-overrides (#15)
* Compatibility with import-map-overrides * More files * Documentation * Add test script * Clarify version of import-map-overrides
- Loading branch information
1 parent
7eea9dc
commit caa5bc9
Showing
5 changed files
with
2,019 additions
and
1,604 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
branches: "*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "22" | ||
- uses: pnpm/action-setup@v4 | ||
- run: pnpm install --frozen-lockfile | ||
- run: pnpm run build | ||
- run: pnpm test | ||
- run: pnpm run check-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,3 +177,21 @@ When using external import maps, import-map-injector must wait for the network r | |
}); | ||
</script> | ||
``` | ||
|
||
## Compatibility | ||
|
||
import-map-injector is compatible with [import-map-overrides@>=4.1.0](https://github.com/single-spa/import-map-overrides) via an in-code integration. To use the two projects together, do the following: | ||
|
||
1. Load import-map-overrides.js **before** import-map-injector.js | ||
|
||
```html | ||
<!-- overrides before injector. [email protected] or greater required --> | ||
<script src="import-map-overrides.js"></script> | ||
<script src="import-map-injector.js"></script> | ||
``` | ||
|
||
2. Add the `use-injector` attribute to the `<meta name="importmap-type">` element that configures import-map-overrides. See [import-map-overrides docs](https://github.com/single-spa/import-map-overrides/blob/main/docs/configuration.md#import-map-type) for more details | ||
|
||
```html | ||
<meta name="importmap-type" use-injector /> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
"format": "prettier --write .", | ||
"check-format": "prettier --check .", | ||
"watch": "rollup -cw", | ||
"test": "echo \"No tests\"", | ||
"test-serve": "node fixtures/server.js", | ||
"build": "concurrently pnpm:build:*", | ||
"prepublishOnly": "pnpm run build", | ||
|
@@ -47,5 +48,6 @@ | |
"prettier": "^3.0.2", | ||
"rollup": "^3.28.0", | ||
"typescript": "^5.1.6" | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
Oops, something went wrong.