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

Problems with UMD Build and Webpack #16

Open
codeart1st opened this issue Apr 30, 2017 · 1 comment
Open

Problems with UMD Build and Webpack #16

codeart1st opened this issue Apr 30, 2017 · 1 comment

Comments

@codeart1st
Copy link

Hey is it possible to generate the js bundle without all the dependencies? The js bundle from react-openlayers ist huge (1.42MB) and includes react+openlayers itself.

If you try things like this with proj4 in a plain es6/jsx project

import { Controls, Layers, Map, control, layer } from 'react-openlayers';

import React from 'react';
import ol from 'openlayers';
import proj4 from 'proj4';

ol.proj.setProj4(proj4);
proj4.defs(EPSG25833, '+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs');

it's not possible to get it working, because there are two instances of ol defined in the final bundle. Currently I use my own build from your npm package with webpack-node-externals activated. Would be nice if a smaller bundle could be the default - and then setting the peer dependencies (ol, react, ...) in npm package.json itself.

@allenhwkim
Copy link
Owner

Thanks I agree with you
If possible can you make a PR, Pull Request, before I make time for it?

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