highFlyingSmurfs
highFlyingSmurfs

Reputation: 3039

Can't use openlayers-3 with webpack

I have to include openlayers in a project that I am working on. I have tried both including it in a ext folder and by npm.

I am using Webpack in my workflow. On compilation I get the following warning in my console.

WARNING in ./~/openlayers/dist/ol.js Critical dependencies: 730:1111-1118 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. @ ./~/openlayers/dist/ol.js 730:1111-1118

Any idea what is this?

Upvotes: 2

Views: 572

Answers (1)

Jorawar Singh
Jorawar Singh

Reputation: 7621

It's telling you that the file you are trying to require is already built and suggesting you that use the main file instead of pre-built. Try to require main file instead of pre-built from dist folder and that should resolve your problem

Upvotes: 1

Related Questions