forked from yugabyte/yugabyte-db
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
41 lines (39 loc) · 957 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
37
38
39
40
41
const path = require('path');
const config = {
context: path.join(__dirname, 'src'),
entry: {
site: ['./index.js'],
},
output: {
path: path.join(__dirname, 'static/js'),
filename: '[name].js'
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
include: path.join(__dirname, 'src'),
enforce: 'pre',
use: [
{
loader: path.join(__dirname, 'node_modules/eslint-loader/index.js'),
options: { eslintPath: path.join(__dirname, 'node_modules/eslint/lib/api.js'),
ignore: false,
useEslintrc: true,
},
}
],
},
{
test: /\.(js|jsx)$/,
include: path.join(__dirname, 'src'),
loader: path.join(__dirname, 'node_modules/babel-loader/lib/index.js'),
options: {
babelrc: true,
cacheDirectory: true,
}
},
],
},
};
module.exports = config;