This repository has been archived by the owner on Nov 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
webpack.config.dev.js
executable file
·73 lines (69 loc) · 1.85 KB
/
webpack.config.dev.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
'use strict';
var path = require('path');
var webpack = require('webpack');
var ENV = {
__BUILD__ : {
PRODUCTION : JSON.stringify(false),
DEVELOP : JSON.stringify(true),
BASE_URL : JSON.stringify("http://localhost:3000"),
BASE_URL_PORT : JSON.stringify("3000"),
API_URL : JSON.stringify("http://localhost:3000"),
API_PORT : JSON.stringify("3000"),
USERS_API_URL : JSON.stringify("http://localhost:3100"),
USERS_API_PORT : JSON.stringify("3100"),
COVERAGE_API_URL : JSON.stringify("http://localhost:3200"),
COVERAGE_API_PORT : JSON.stringify("3200"),
WEBSOCKET_URL : JSON.stringify("ws://localhost:3000/ws"),
WEBSOCKET_PORT : JSON.stringify("3000"),
STATIC_ASSETS_URL : JSON.stringify("http://localhost:3000"),
SEGMENT_KEY : JSON.stringify(""),
SEGMENT_APP_PROPERTIES: JSON.stringify('{ "app_version": "2.0.0beta1" }'),
}
};
module.exports = {
devtool: 'cheap-module-eval-source-map',
entry: [
'webpack-hot-middleware/client?path=//localhost:4000/__qri_io',
'./src/js/index'
],
output: {
// path: path.join(__dirname, 'dist'),
path : __dirname,
filename: 'bundle.js',
publicPath: '//localhost:4000/static/'
},
// resolve: {
// alias: {
// 'react-ace': path.join(__dirname, '..', 'src', 'ace.jsx')
// }
// },
plugins: [
new webpack.DefinePlugin(ENV),
// new webpack.optimize.OccurenceOrderPlugin(),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin()
],
module: {
rules: [
{
test: /\.js?$/,
use: ['babel-loader'],
exclude: /node_modules/,
},
{
test: /\.scss$/,
use: [
"style-loader",
"css-loader",
"sass-loader"
]
},
{
test: /\.css$/,
use: [
"css-loader",
]
}
]
}
};