Skip to content

Commit

Permalink
fix: added missing library in package (#18)
Browse files Browse the repository at this point in the history
* fix: added missing library in package

* added missing package for src/GoogleLayer.js

* changes after build

* Update package.json
  • Loading branch information
Mylothros-Charalampos authored Jul 7, 2021
1 parent 99d0609 commit 23140ed
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 145 deletions.
160 changes: 81 additions & 79 deletions dist/react-leaflet-google-v2.js

Large diffs are not rendered by default.

28 changes: 20 additions & 8 deletions dist/react-leaflet-google-v2.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion example/google.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { MapContainer, TileLayer, LayersControl } from 'react-leaflet'
import { GoogleLayer } from '../src'
//import { GoogleLayer } from '../src'
import { GoogleLayer } from '../dist/react-leaflet-google-v2.min.js'
const { BaseLayer } = LayersControl;
const key = 'AIzaSyDEG4lyorD61vnJoAHG0FkQERZ-McElZyg';
const terrain = 'TERRAIN';
Expand Down
6 changes: 4 additions & 2 deletions example/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ module.exports = {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"]
}
}
},
{
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"homepage": "https://github.com/TA-Geoforce/react-leaflet-google-v2#readme",
"dependencies": {
"@react-leaflet/core": "^1.1.0",
"google-maps": "^3.3.0",
"react-leaflet": "^3.0.5"
},
Expand Down
67 changes: 16 additions & 51 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,22 @@ module.exports = {
library: 'ReactLeaflet',
libraryTarget: 'umd'
},
externals: [
{
leaflet: {
amd: 'leaflet',
commonjs: 'leaflet',
commonjs2: 'leaflet',
root: 'L'
}
},
{
jquery: {
amd: 'jquery',
commonjs: 'jquery',
commonjs2: 'jquery',
root: 'JQuery'
}
},
{
'react-leaflet': {
amd: 'react-leaflet',
commonjs: 'react-leaflet',
commonjs2: 'react-leaflet'
}
},
{
react: {
amd: 'react',
commonjs: 'react',
commonjs2: 'react',
root: 'React'
}
},
{
'google-maps': {
amd: 'google-maps',
commonjs: 'google-maps',
commonjs2: 'google-maps',
root: 'GoogleMapsLoader'
}
}
],
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
}
]
}
rules: [
{
test: /\.(js|jsx)$/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"],
}
},
},
{
test: /\.css$/,
use: ["style-loader", "css-loader"]
}
]
}
};

0 comments on commit 23140ed

Please sign in to comment.