2d-inc / Flare-JS

Flare Javascript ES6 runtime with Canvas rendering.
https://flare.rive.app
MIT License
265 stars 59 forks source link

Module Parse Failed #39

Closed obitodarky closed 4 years ago

obitodarky commented 4 years ago

I used my a JSON exported .flr file in my react app, however it throws me the following error:

Module parse failed: Unexpected token (2:10)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| {
>   "version": 24,
|   "artboards": [
|       {

Here is how I imported my file, just in case.

import lightAnimation from '../light_2.flr'
  ...
    ...
      <FlareComponent width="100" height="100" animationName="green" file={lightSaberAnimation} />
  ...
...
obitodarky commented 4 years ago

Okay the issue was with the import statement. import X from '.flr' will obviously not work. Closing this for now