-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.babel.js
More file actions
54 lines (53 loc) · 1021 Bytes
/
webpack.config.babel.js
File metadata and controls
54 lines (53 loc) · 1021 Bytes
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
45
46
47
48
49
50
51
52
53
54
import path from 'path';
export default {
mode: "development",
entry: {
'PathFinder': path.join(__dirname, './src/PathFinding/index.js'),
'PageScripts': path.join(__dirname, './src/PageScripts/index.js')
},
output: {
path: path.join(__dirname, './build/'),
filename: '[name].bundle.js',
library: '[name]'
},
module: {
rules: [{
test: /\.js$/,
exclude: /node_modules/,
use: [{
loader: 'babel-loader',
options:{
presets: [
[
"@babel/preset-env",
{
"targets": "defaults"
}
]
],
"sourceType": "unambiguous"
}
}]
}, {
test: /\.js$/,
exclude: /node_modules/,
use: [{
loader: 'eslint-loader'
}]
}]
},
stats: {
colors: true,
modules: false
},
devServer: {
publicPath: '/PathFinding/build/',
contentBase: path.join(__dirname, './page'),
contentBasePublicPath: '/PathFinding/page/',
watchContentBase: true,
port: 8000,
open: true,
openPage: 'PathFinding/page'
},
devtool: 'source-map'
};