Skip to content

Commit

Permalink
Fix import error in CRA environment
Browse files Browse the repository at this point in the history
Using @planet/maps in a CRA app was causing an import error
since the package.json specifys `type: "module"` the loader
wants this import to end in `.js`.
  • Loading branch information
theduckylittle committed Oct 25, 2022
1 parent 6a86a1c commit 3b9f4d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import OLMap from 'ol/Map';
import OLMap from 'ol/Map.js';
import {Component, createElement, createRef, forwardRef} from 'react';
import {any, func, node, object, oneOfType, shape, string} from 'prop-types';
import {render, updateInstanceFromProps} from '../renderer/render.js';
Expand Down
4 changes: 2 additions & 2 deletions renderer/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import Control from 'ol/control/Control.js';
import GroupLayer from 'ol/layer/Group.js';
import Interaction from 'ol/interaction/Interaction.js';
import Overlay from 'ol/Overlay.js';
import ReactReconciler from 'react-reconciler';
import ReactReconciler from 'react-reconciler.js';
import Source from 'ol/source/Source.js';
import View from 'ol/View.js';
import {CONTROL, INTERACTION, LAYER, OVERLAY, SOURCE, VIEW} from '../config.js';
import {ConcurrentRoot, DefaultEventPriority} from 'react-reconciler/constants';
import {ConcurrentRoot, DefaultEventPriority} from 'react-reconciler/constants.js';
import {
prepareControlUpdate,
prepareInteractionUpdate,
Expand Down

0 comments on commit 3b9f4d6

Please sign in to comment.