-
Notifications
You must be signed in to change notification settings - Fork 5
/
webpack.config.js
38 lines (37 loc) · 1.05 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const path = require( 'path' );
const defaultConfig = require( './node_modules/@wordpress/scripts/config/webpack.config' );
module.exports = {
...defaultConfig,
entry: {
mapboxglLoader: './src/js/src/mapboxgl-loader.js',
jeoMap: {
import: './src/js/src/jeo-map/index.js',
dependOn: ['mapboxglLoader'],
},
JeoLayer: './src/includes/layer-types/JeoLayer.js',
JeoLegend: './src/includes/legend-types/JeoLegend.js',
mapBlocks: {
import: './src/js/src/map-blocks/index.js',
dependOn: ['mapboxglLoader'],
},
discovery: './src/js/src/discovery/index.js',
// storymap: './src/js/src/map-blocks/storymap.js',
layersSidebar: {
import: './src/js/src/layers-sidebar/index.js',
dependOn: ['mapboxglLoader'],
},
mapsSidebar: {
import: './src/js/src/maps-sidebar/index.js',
dependOn: ['mapboxglLoader'],
},
postsSidebar: './src/js/src/posts-sidebar/index.js',
},
externals: {
'mapbox-gl': 'mapboxgl',
},
output: {
path: path.resolve( __dirname, './src/js/build/' ),
publicPath: './src/js/build/',
filename: '[name].js',
},
};