blckvmamba
blckvmamba
WWasp-lang
Created by blckvmamba on 8/7/2024 in #đŸ™‹questions
Has anyone succeeded in using leaflet package with opensaas? (Could be a Vite issue?)
[wasp ^0.14.0, macbook M2 Sonoma 14.5] I've implemented a map in jsx using "leaflet, react-leaflet, react-leaflet-draw". The page loads fine except the map. I've been able to build the same page using jsx in a different repo without wasp. (it only uses react to build this). When run (wasp start), I get [ Client!] The request url "/../app/node_modules/leaflet-draw/dist/images/spritesheet.svg" is outside of Vite serving allow list. To fix I add path.resolve(__dirname, 'node_modules/leaflet-draw/dist/images') to server.fs.allow This doesnt fix anything. leading to more errors, [ Client!] The request url "/../app/.wasp/out/web-app/src/index.tsx" is outside of Vite serving allow list. I resolve in the same way: "path.resolve(__dirname, '.wasp/out/web-app/src')" No more errors, but the map still isn't rendering. Any suggestions please? Thanks, Jordan
11 replies