AdamTyler / react-dice-complete

Complete dice rolling functionality and animations
http://adam-tyler.com/react-dice-complete
ISC License
79 stars 26 forks source link

Can't resolve 'react-dice-complete/dist/react-dice-complete.css #75

Closed josegamboa closed 1 year ago

josegamboa commented 1 year ago

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...

AdamTyler commented 1 year ago

@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