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

Change package.json main attribute to solve Webpack warning and provide proper dependency #207

Open
israelmw opened this issue Jun 25, 2016 · 1 comment
Milestone

Comments

@israelmw
Copy link

Hi,
My problem with webpack structure is load warning and not fount constant svgPanZoom.
This is warning console:

WARNING in ./bower_components/svg-pan-zoom/dist/svg-pan-zoom.js
Critical dependencies:
3:113-120 This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.
 @ ./bower_components/svg-pan-zoom/dist/svg-pan-zoom.js 3:113-120

Any idea to solved webpack use?

@bumbu bumbu added this to the v4.0 milestone Sep 3, 2016
@bumbu
Copy link
Owner

bumbu commented Sep 3, 2016

That is happening because when you require svg-pan-zoom, it looks into package.json for the main field. Currently main field points to the compiled version.
I suppose the proper way of doing it would be to have it pointing to ./src/svg-pan-zoom.js but I don't know if that will break anyone's build.
So the safest way of doing that would be in a new major version.

@bumbu bumbu changed the title Webpack Conflict Change package.json main attribute to solve Webpack warning and provide proper dependency Sep 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants