-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] fixes for exported maps (#2807)
- fix broken maplibre gl css link - fix umd build - use react 18.3.1 in exported maps - temp fix for missing datasets in exported maps Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
- Loading branch information
1 parent
979c9a5
commit 95448ac
Showing
25 changed files
with
578 additions
and
214 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
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,58 @@ | ||
// SPDX-License-Identifier: MIT | ||
// Copyright contributors to the kepler.gl project | ||
|
||
import esbuild from 'esbuild'; | ||
import {replace} from 'esbuild-plugin-replace'; | ||
import {umdWrapper} from 'esbuild-plugin-umd-wrapper'; | ||
|
||
import process from 'node:process'; | ||
import {spawn} from 'node:child_process'; | ||
import {join} from 'node:path'; | ||
import KeplerPackage from '../package.json' assert {type: 'json'}; | ||
|
||
const LIB_DIR = './'; | ||
const NODE_MODULES_DIR = join(LIB_DIR, 'node_modules'); | ||
const SRC_DIR = join(LIB_DIR, 'src'); | ||
|
||
const config = { | ||
entryPoints: ['./src/index.js'], | ||
bundle: true, | ||
platform: 'browser', | ||
outfile: './umd/keplergl.min.js', | ||
format: 'umd', | ||
logLevel: 'error', | ||
minify: true, | ||
sourcemap: false, | ||
treeShaking: true, | ||
|
||
external: ['react', 'react-dom', 'redux', 'react-redux', 'styled-components'], | ||
|
||
plugins: [ | ||
// automatically injected kepler.gl package version into the bundle | ||
replace({ | ||
__PACKAGE_VERSION__: KeplerPackage.version, | ||
include: /constants\/src\/default-settings\.ts/ | ||
}), | ||
umdWrapper({ | ||
libraryName: "KeplerGl", | ||
globals: { | ||
"react": "React", | ||
"react-dom": "ReactDOM", | ||
'redux': 'Redux', | ||
'react-redux': 'ReactRedux', | ||
'styled-components': 'styled' | ||
} | ||
}) | ||
] | ||
}; | ||
|
||
(async () => { | ||
await esbuild | ||
.build({ | ||
...config | ||
}) | ||
.catch(e => { | ||
console.error(e); | ||
process.exit(1); | ||
}); | ||
})(); |
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
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
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
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
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
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
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
Oops, something went wrong.