forked from dmelcer9/connect-four-dapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
37 lines (35 loc) · 1016 Bytes
/
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
var webpack = require("webpack");
var CopyWebpackPlugin = require('copy-webpack-plugin');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var path = require('path');
module.exports = {
entry: './app/script/main.js',
output: {
path: path.join(__dirname, 'docs'),
filename: 'app.js'
},
module: {
loaders: [
{ test: /\.(js|jsx|es6)$/, exclude: /node_modules/, loader: "babel-loader"},
{ test: /\.css$/i, loader: ["style-loader","css-loader"]},
{ test: /\.scss$/i, loader: ExtractTextPlugin.extract(["css", "sass"])},
{ test: /\.json$/i, loader: "json-loader"},
{ test: /\.sol/, loader: 'truffle-solidity-loader' }
]
},
plugins: [
new CopyWebpackPlugin([
{ from: './app/index.html', to: "index.html" },
{ from: './app/style', to: "style"},
]),
new ExtractTextPlugin("app.css")
],
devServer: {
stats: 'errors-only',
host: '0.0.0.0',
port: 80,
// allowedHosts: [
// 'example.com'
// ]
}
};