diff options
author | hellekin <hellekin@cepheide.org> | 2020-11-13 00:07:11 +0100 |
---|---|---|
committer | hellekin <hellekin@cepheide.org> | 2020-11-13 00:10:20 +0100 |
commit | 46ee25fabfc3d2a4493004535774ddea1ad01c91 (patch) | |
tree | 23ea237ec9c81311fb31cccf0eb7cc8e1d9ac9bc | |
parent | 7297617845dc1f57fd4b921c7a413d795ee8cb5f (diff) | |
download | incommon-map-46ee25fabfc3d2a4493004535774ddea1ad01c91.tar.gz |
Add leaflet plugin to fix webpack compatibility
-rw-r--r-- | app/javascript/controllers/map_controller.js | 5 | ||||
-rw-r--r-- | package.json | 1 | ||||
-rw-r--r-- | yarn.lock | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/app/javascript/controllers/map_controller.js b/app/javascript/controllers/map_controller.js index 5363e5e..2a2b310 100644 --- a/app/javascript/controllers/map_controller.js +++ b/app/javascript/controllers/map_controller.js @@ -7,14 +7,15 @@ // import { Controller } from "stimulus" -import L from "leaflet" import "leaflet/dist/leaflet.css" +import L from "leaflet" + export default class extends Controller { static targets = [ "container" ] initialize() { - console.log("Map controller initialized.") + } connect() { diff --git a/package.json b/package.json index 101fb8b..552cedc 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "@rails/ujs": "^6.0.0", "@rails/webpacker": "4.3.0", "leaflet": "^1.7.1", + "leaflet-defaulticon-compatibility": "^0.1.1", "stimulus": "^1.1.1", "turbolinks": "^5.2.0" }, @@ -4160,6 +4160,11 @@ last-call-webpack-plugin@^3.0.0: lodash "^4.17.5" webpack-sources "^1.1.0" +leaflet-defaulticon-compatibility@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/leaflet-defaulticon-compatibility/-/leaflet-defaulticon-compatibility-0.1.1.tgz#ab72257b3da66fb48dab69a10c3824012a15a20a" + integrity sha512-vDBFdlUAwjSEGep9ih8kfJilf6yN8V9zTbF5NC/1ZwLeGko3RUQepspPnGCRMFV51dY3Lb3hziboicrFz+rxQA== + leaflet@^1.7.1: version "1.7.1" resolved "https://registry.yarnpkg.com/leaflet/-/leaflet-1.7.1.tgz#10d684916edfe1bf41d688a3b97127c0322a2a19" |