forked from InfoAmazonia/jeo-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
37 lines (36 loc) · 1.06 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
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: './src/js/src/jeo-map/index.js',
JeoLayer: './src/includes/layer-types/JeoLayer.js',
JeoLegend: './src/includes/legend-types/JeoLegend.js',
mapBlocks: './src/js/src/map-blocks/index.js',
discovery: './src/js/src/discovery/index.js',
// storymap: './src/js/src/map-blocks/storymap.js',
layersSidebar: './src/js/src/layers-sidebar/index.js',
mapsSidebar: './src/js/src/maps-sidebar/index.js',
postsSidebar: './src/js/src/posts-sidebar/index.js',
},
output: {
path: path.resolve( __dirname, './src/js/build/' ),
publicPath: './src/js/build/',
filename: '[name].js',
},
module: {
...defaultConfig.module,
rules: [
...defaultConfig.module.rules,
{
test: /\.css$/,
use: [ 'style-loader', 'css-loader' ],
},
{
test: /\.s[ac]ss$/i,
use: [ 'style-loader', 'css-loader', 'sass-loader' ],
},
],
},
};