JS module for consuming Pladias geowebservices by using OpenLayers.
{
"dependencies": {
"geoservices-for-browser": "pladias-cz/geoservices-for-browser#v0.3.1"
}
}Since v0.2 the .env file has to be used to configure geoserver URL.
Add to the webpack.config.js:
const webpack = require('webpack');
const dotenv = require('dotenv');
const env = dotenv.config().parsed;
//... pure Webpack
plugins: [
new webpack.DefinePlugin({ //https://webpack.js.org/plugins/define-plugin/
'process.env': JSON.stringify(env)
})
]
// Encore
Encore.addPlugin(new webpack.DefinePlugin({
'process.env': JSON.stringify(env)
});and create .env file next to webpack.config.js
- divide content into general and site-specific