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 a394072
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 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
2 changes: 1 addition & 1 deletion renderer/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import ReactReconciler from 'react-reconciler';
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 a394072

Please sign in to comment.