Skip to content

Commit

Permalink
Reimplement map with MapLibre and VersaTiles (#63)
Browse files Browse the repository at this point in the history
* Reimplement map with MapLibre and VersaTiles

Co-authored-by: Marcus Weiner <[email protected]>

* Remove remaining references to leaflet

* Fetch tiles from same origin

* Load fonts

* Fix use of window and document in SSR

* Provide empty sprite libraries

* Upgrade canvas

* Specify node version

* Specify transpilation targets

* Allow forcing imports to be assets

* Use unaltered worker script for map

* Revert setting worker URL

* Use narrower browser support

* Debug tiles api

* Serve tiles uncompressed

---------

Co-authored-by: Marcus Weiner <[email protected]>
Co-authored-by: Marcus Weiner <[email protected]>
  • Loading branch information
3 people authored Nov 22, 2023
1 parent 52a97ab commit acf1dc2
Show file tree
Hide file tree
Showing 528 changed files with 2,796 additions and 200 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
node_modules/
.cache/
public

# Local Netlify folder
.netlify
6 changes: 0 additions & 6 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,5 @@ module.exports = {
},
__key: "blog",
},
{
resolve: "gatsby-plugin-react-leaflet",
options: {
linkStyles: false,
},
},
],
};
26 changes: 19 additions & 7 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,27 @@ exports.createPages = async ({ graphql, actions, reporter }) => {

/** @type {import("gatsby").GatsbyNode["onCreateWebpackConfig"]} */
exports.onCreateWebpackConfig = ({ getConfig, stage, loaders, actions }) => {
if (stage === "build-html" || stage === "develop-html") {
const config = getConfig();
actions.setWebpackConfig({
externals: [
const config = getConfig();
const newConfig = {
...config,
module: {
...config.module,
rules: [
{
canvas: "commonjs canvas",
resourceQuery: "?asset",
type: "asset/resource",
},
...config.externals,
...config.module.rules,
],
});
},
};
if (stage === "build-html" || stage === "develop-html") {
newConfig.externals = [
{
canvas: "commonjs canvas",
},
...config.externals,
];
}
actions.replaceWebpackConfig(newConfig);
};
3 changes: 3 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[build]
functions = "src/functions"

[[redirects]]
from = "/kegelbahn"
to = "https://bbb.kalk.space/rooms/gdf-1yc-88b-yxb/join"
Expand Down
Loading

0 comments on commit acf1dc2

Please sign in to comment.