Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Import Breaks Builds #16

Open
spsDrop opened this issue Mar 19, 2019 · 1 comment
Open

Incorrect Import Breaks Builds #16

spsDrop opened this issue Mar 19, 2019 · 1 comment

Comments

@spsDrop
Copy link

spsDrop commented Mar 19, 2019

This import blows up our build system when we try to use this library. I don't think it should be pointing directly to the dist min file. Shouldn't it be:

import lottieApi from 'lottieApi';

import lottieApi from 'lottie-api/dist/lottie_api';

@beau6183
Copy link

lottie-api incorrectly references their "main" script in package.json as dist/lottie_api.js. This should be set to src/index.js so that webpack and other transpilers can more efficiently package code. The statically compiled files in dist are for loading it stand-alone.

To side step this problem, lottie-react-web should use this import:

import lottieApi from 'lottie-api/src/index'

(and lottie-react-web should probably do the same thing)

See this for more info: webpack/webpack#1617 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants