Can't resolve 'react-dice-complete/dist/react-dice-complete.css
josegamboa opened this issue · 1 comments
Hi Guys,
Thanks for working on the changes for React 18 and Typescript. I was testing version 2.1.0 and seems like the package is failing when compiling the app.
`
import React, { useRef } from 'react'
import ReactDice, { ReactDiceRef } from 'react-dice-complete'
const MyDiceApp = () => {
const reactDice = useRef(null)
const rollDone = (totalValue: number, values: number[]) => {
console.log('individual die values array:', values)
console.log('total dice value:', totalValue)
}
const rollAll = () => {
reactDice.current?.rollAll()
}
render() {
return (
)
}
}
`
React: 18.2.0
Typescript: 4.9.5
Error:
`Module not found: Error: Can't resolve 'react-dice-complete/dist/react-dice-complete.css'
Thanks...
@josegamboa as of version 2.0.3 there is no longer a separate css file and it shouldn't be needed.
You must have some old code cached that is trying to import the css explicitly