-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
52 lines (50 loc) · 1.66 KB
/
webpack.config.js
File metadata and controls
52 lines (50 loc) · 1.66 KB
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
/* eslint import/no-extraneous-dependencies: 0 */
const path = require('path');
module.exports = {
mode: 'development',
entry: {
webchat: './src/webchat/index.js',
botchat: './src/botchat/index.js'
},
output: {
path: path.join(__dirname, 'docs'),
filename: '[name].js',
publicPath: '/'
},
resolve: {
extensions: ['.js', '.jsx', '.json']
},
plugins: [],
module: {
rules: [
{
test: /\.jsx?$/,
// exclude just isomorph libraries
// exclude: /node_modules(\\|\/)(?!(prg-editor)(\\|\/)).*/i,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
presets: [
'@babel/preset-react',
[
'@babel/preset-env',
{
useBuiltIns: 'entry',
targets: {
browsers: ['> 1%', 'last 3 versions', 'ie >= 10']
}
}
]
],
plugins: [
// '@babel/plugin-proposal-class-properties',
// '@babel/plugin-transform-object-set-prototype-of-to-assign',
// ['@babel/plugin-transform-runtime', { useESModules: true, corejs: 2 }],
// '@babel/plugin-proposal-object-rest-spread'
],
cacheDirectory: true
}
}
]
}
};