Module Parse Failed
obitodarky opened this issue · 1 comments
obitodarky commented
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": [
| {
- I tried it with Binary file as well and it threw a
Unexpected character '' (1:2)
error. - I also tried it with a
.flr2d
file and got the same error as above
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
Okay the issue was with the import statement.
import X from '.flr'
will obviously not work.
Closing this for now