Skip to content

Blank map after removing react-scripts / CRA and upgrading to Vite #2388

Closed Answered by JamesRexMiller4
JamesRexMiller4 asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry for the slow reply, but did find the source of the issue. Your intuition was correct in it not being a transpilation issue. In the end it was CSS reset styling declaration giving the canvas element a style of display: none 🙃

Odd part is that the styling declaration has been in there for a little over three years, so wasn't immediately apparent that that would have been the issue since I'd been working with Mapbox/react-map-gl/deck.gl for almost as long and never had an issue. The styling declaration was in the index.css file so I am thinking that Vite must be bundling the css files in a different order, where some cascading canvas declaration was previously covering up this conflict.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@JamesRexMiller4
Comment options

@JamesRexMiller4
Comment options

@Pessimistress
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by JamesRexMiller4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants