Skip to content

Commit acf1dc2

Browse files
Reimplement map with MapLibre and VersaTiles (#63)
* Reimplement map with MapLibre and VersaTiles Co-authored-by: Marcus Weiner <mraerino@users.noreply.github.com> * 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 <mraerino@users.noreply.github.com> Co-authored-by: Marcus Weiner <marcus.weiner@gmail.com>
1 parent 52a97ab commit acf1dc2

File tree

528 files changed

+2796
-200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

528 files changed

+2796
-200
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
node_modules/
22
.cache/
33
public
4+
5+
# Local Netlify folder
6+
.netlify

gatsby-config.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,5 @@ module.exports = {
3434
},
3535
__key: "blog",
3636
},
37-
{
38-
resolve: "gatsby-plugin-react-leaflet",
39-
options: {
40-
linkStyles: false,
41-
},
42-
},
4337
],
4438
};

gatsby-node.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,27 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
7777

7878
/** @type {import("gatsby").GatsbyNode["onCreateWebpackConfig"]} */
7979
exports.onCreateWebpackConfig = ({ getConfig, stage, loaders, actions }) => {
80-
if (stage === "build-html" || stage === "develop-html") {
81-
const config = getConfig();
82-
actions.setWebpackConfig({
83-
externals: [
80+
const config = getConfig();
81+
const newConfig = {
82+
...config,
83+
module: {
84+
...config.module,
85+
rules: [
8486
{
85-
canvas: "commonjs canvas",
87+
resourceQuery: "?asset",
88+
type: "asset/resource",
8689
},
87-
...config.externals,
90+
...config.module.rules,
8891
],
89-
});
92+
},
93+
};
94+
if (stage === "build-html" || stage === "develop-html") {
95+
newConfig.externals = [
96+
{
97+
canvas: "commonjs canvas",
98+
},
99+
...config.externals,
100+
];
90101
}
102+
actions.replaceWebpackConfig(newConfig);
91103
};

netlify.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[build]
2+
functions = "src/functions"
3+
14
[[redirects]]
25
from = "/kegelbahn"
36
to = "https://bbb.kalk.space/rooms/gdf-1yc-88b-yxb/join"

0 commit comments

Comments
 (0)