mirror of
https://github.com/jlengrand/leaflet-geosearch.git
synced 2026-03-10 00:21:20 +00:00
27 lines
670 B
JavaScript
27 lines
670 B
JavaScript
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
const path = require('path');
|
|
|
|
exports.onCreateWebpackConfig = ({ actions, stage, loaders }) => {
|
|
if (stage === 'build-html' || stage === 'develop-html') {
|
|
actions.setWebpackConfig({
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: [/node_modules\/leaflet/, /node_modules\\leaflet/],
|
|
use: loaders.null(),
|
|
},
|
|
],
|
|
},
|
|
});
|
|
}
|
|
|
|
actions.setWebpackConfig({
|
|
resolve: {
|
|
modules: [path.resolve(__dirname, '../docs'), 'node_modules'],
|
|
alias: {
|
|
'leaflet-geosearch': path.resolve(__dirname, '../dist/geosearch.js'),
|
|
},
|
|
},
|
|
});
|
|
};
|