Skip to content

Commit

Permalink
Add alias for missing optional peer dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
testower committed Jan 11, 2024
1 parent d7e9ecd commit 3ddb9f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client-next/src/mapbox-gl-empty-replacement.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// The only purpose of this module is to silence an error thrown by Vite in development mode
// due to a (intentionally) missing *optional* peer dependency (mapbox-gl).
exports = {};

Check failure on line 3 in client-next/src/mapbox-gl-empty-replacement.js

View workflow job for this annotation

GitHub Actions / debug-client

'exports' is not defined
5 changes: 5 additions & 0 deletions client-next/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ export default defineConfig({
outDir: 'output',
emptyOutDir: true,
},
resolve: {
alias: {
'mapbox-gl': 'src/mapbox-gl-empty-replacement.js',
},
},
});

0 comments on commit 3ddb9f7

Please sign in to comment.