-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathwebpack.config.js
executable file
·66 lines (63 loc) · 1.42 KB
/
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
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
var path = require('path');
var rpcport = process.env.TESTRPC_PORT || '8545';
var web3provider = process.env.WEB3_PROVIDER || 'http://localhost:' + rpcport;
console.log('Building with web3 provider: ', web3provider);
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: 'source-map',
entry: ['./index'],
output: {
path: path.resolve('./static/'),
publicPath: '/bundles/',
filename: '[name].js'
},
web3Loader: {
provider: web3provider,
constructorParams: {
Chess: [true] // Enable debugging
}
},
module: {
preLoaders: [
{
test: /\.js$/,
exclude: [/node_modules/, /\.tmp/],
loader: 'jshint-loader'
}
],
loaders: [
{
test: /\.sol$/,
loaders: ['web3', 'solc']
},
{
test: /\.json$/,
loaders: ['json']
},
{
test: /\.js$/,
loaders: ['babel'],
exclude: /node_modules/,
include: __dirname
},
{
test: /\.(png)|(jpg)|(gif)|(otf)|(eot)|(ttf)|(woff)|(svg)$/,
loaders: ['file-loader']
},
{
test: /\.less$/,
loader: ExtractTextPlugin.extract('style-loader',
'css?sourceMap!' +
'less?sourceMap'
)
}
]
},
jshint: {
emitErrors: false,
failOnHint: false
},
plugins: [
new ExtractTextPlugin('styles.css')
]
};