chore: fix docz

This commit is contained in:
Stephan Meijer
2022-06-08 21:54:36 +02:00
parent 9fe12b2943
commit 3883f9684b
3 changed files with 21 additions and 3 deletions

View File

@@ -1,7 +1,9 @@
# Leaflet.GeoSearch # Leaflet.GeoSearch
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-48-orange.svg?style=flat-square)](#contributors-) [![All Contributors](https://img.shields.io/badge/all_contributors-48-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END --> <!-- ALL-CONTRIBUTORS-BADGE:END -->
**Demo and Docs: [smeijer.github.io/leaflet-geosearch](https://smeijer.github.io/leaflet-geosearch)** **Demo and Docs: [smeijer.github.io/leaflet-geosearch](https://smeijer.github.io/leaflet-geosearch)**
@@ -330,6 +332,9 @@ Bing does not support `CORS`, and requires `jsonp` to be used instead.
In case you decide to write your own provider, please consider submitting a PR In case you decide to write your own provider, please consider submitting a PR
to share your work with us. to share your work with us.
You can use the docs as "development environment". Please run `npm run start` to get up and running. The docs will
refresh when you change source files.
[leaflet]: http://leafletjs.com [leaflet]: http://leafletjs.com
[docs]: https://smeijer.github.io/leaflet-geosearch [docs]: https://smeijer.github.io/leaflet-geosearch
[babel-polyfill]: https://npmjs.com/babel-polyfill [babel-polyfill]: https://npmjs.com/babel-polyfill

View File

@@ -1,8 +1,21 @@
/* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path'); const path = require('path');
exports.onCreateWebpackConfig = (args) => { exports.onCreateWebpackConfig = ({ actions, stage, loaders }) => {
args.actions.setWebpackConfig({ if (stage === 'build-html' || stage === 'develop-html') {
actions.setWebpackConfig({
module: {
rules: [
{
test: [/node_modules\/leaflet/, /node_modules\\leaflet/],
use: loaders.null(),
},
],
},
});
}
actions.setWebpackConfig({
resolve: { resolve: {
modules: [path.resolve(__dirname, '../docs'), 'node_modules'], modules: [path.resolve(__dirname, '../docs'), 'node_modules'],
alias: { alias: {

View File

@@ -9,7 +9,7 @@
"allowJs": true, "allowJs": true,
"pretty": true, "pretty": true,
"strict": true, "strict": true,
"rootDir": "src", "rootDirs": ["src", "docs"],
"sourceMap": true, "sourceMap": true,
"removeComments": false, "removeComments": false,
"noEmitHelpers": false, "noEmitHelpers": false,