-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
36 lines (34 loc) · 910 Bytes
/
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
var path = require('path');
const ESLintPlugin = require('eslint-webpack-plugin');
const PATHS = {
build: path.join(__dirname, '..', '..', '..', 'target', 'classes')
};
module.exports = {
mode: 'development',
entry: './src/index.js',
output: {
path: PATHS.build,
filename: 'bundle.js'
},
devtool: 'source-map',
resolve: {
extensions: ['.js', '.jsx']
},
plugins: [new ESLintPlugin()],
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
use: 'babel-loader?' + JSON.stringify({
cacheDirectory: true,
presets: ['@babel/preset-react']
}),
},
{
test: /\.css$/,
use: [ { loader: 'style-loader' }, { loader: 'css-loader' } ],
},
]
}
};