-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
44 lines (44 loc) · 1.29 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
39
40
41
42
43
44
/* eslint-disable no-undef */
// const webpack = require('webpack');
const config = {
mode: 'development',
entry: {
'global.js': __dirname + '/src/webScripts/global.js',
'global.css': __dirname + '/src/assets/css/global.css',
'adminViewConfig.js':
__dirname + '/src/webScripts/adminViewConfigs.jsx',
'crimeMapListing.js': __dirname + '/src/webScripts/crimeMapListing.jsx',
'sharedMap.js': __dirname + '/src/webScripts/sharedMap.jsx',
},
module: {
rules: [
{
test: /\.(js|jsx)?/,
exclude: /node_modules/,
use: 'babel-loader',
},
{
test: /\.css$/i,
use: ['style-loader', 'css-loader', 'postcss-loader'],
},
{
test: /\.(png|svg|jpg|jpeg|gif)$/i,
loader: 'url-loader',
options: {
name: '/static/dist/images/[name].[ext]',
},
},
],
},
resolve: {
extensions: ['.js', '.jsx', '.css'],
alias: {
react: __dirname + '/node_modules/react',
},
},
output: {
path: __dirname + '/src/static/dist',
filename: '[name]',
},
}
module.exports = config