-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add react-map-gl * mark react, react-dom, mapbox-gl as external * Set up eik import mapping of React * Save exact version --------- Co-authored-by: Kjetil Sletten <[email protected]> Co-authored-by: William Killerud <[email protected]>
- Loading branch information
1 parent
ca8f729
commit cf32e80
Showing
4 changed files
with
44 additions
and
0 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
registry=https://registry.npmjs.org/ | ||
package-lock=false | ||
save-exact=true |
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
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,14 @@ | ||
import { createRequire } from "module"; | ||
import * as eik from "@eik/esbuild-plugin"; | ||
import { build } from "../../esbuild.js"; | ||
|
||
const { resolve } = createRequire(import.meta.url); | ||
|
||
await eik.load(); | ||
|
||
await build({ | ||
entryPoints: [resolve("react-map-gl")], | ||
outfile: "./dist/index.js", | ||
external: ["mapbox-gl"], | ||
plugins: [eik.plugin()], | ||
}); |
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,26 @@ | ||
{ | ||
"name": "@finn-no/react-map-gl", | ||
"version": "0.0.0", | ||
"description": "An ESM version of react-map-gl for NMP", | ||
"type": "module", | ||
"scripts": { | ||
"copy": "echo 'noop';", | ||
"build": "node ./esbuild.js", | ||
"eik:login": "eik login", | ||
"eik:publish": "eik publish", | ||
"eik:alias": "eik npm-alias", | ||
"eik:publish:ci": "../../scripts/publish.js react-map-gl react-map-gl" | ||
}, | ||
"dependencies": { | ||
"react-map-gl": "7.1.7" | ||
}, | ||
"eik": { | ||
"name": "react-map-gl", | ||
"server": "https://assets.finn.no", | ||
"type": "npm", | ||
"files": "dist", | ||
"import-map": [ | ||
"https://assets.finn.no/map/react/v18" | ||
] | ||
} | ||
} |