forked from nponiros/sync_client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.config.js
42 lines (41 loc) · 914 Bytes
/
webpack.dev.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
const webpack = require('webpack');
const path = require('path');
module.exports = {
entry: './src/index.js',
devtool: 'source-map',
output: {
path: path.join(__dirname, 'dist'),
filename: 'sync-client.js',
libraryTarget: 'commonjs2',
library: 'sync-client.js',
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
plugins: ['transform-runtime'],
presets: [
['es2015', { modules: false }],
],
},
},
],
},
performance: {
hints: false,
},
plugins: [
new webpack.DefinePlugin({
'process.env': { NODE_ENV: JSON.stringify('development') },
}),
],
resolve: {
extensions: ['.webpack-loader.js', '.web-loader.js', '.loader.js', '.js'],
modules: [
path.resolve(__dirname, 'node_modules'),
],
},
};