forked from CharlieGreenman/pixelLight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
53 lines (51 loc) · 1.49 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
var path = require("path");
var open = require("open");
//for legac systems
require('es6-promise').polyfill();
//a little bit of glitch before page opens,
//works well otherwise
open("http://localhost:8080/");
module.exports = {
entry: [
//'webpack/hot/dev-server',
'webpack-dev-server/client?http://localhost:8080',
path.resolve(__dirname, 'app/js/main.js')
],
output: {
path: path.resolve(__dirname, './dist/js'),
publicPath: 'js',
filename: 'bundle.js'
},
debug: true,
devtool: "#eval-source-map",
module: {
preLoaders: [
{test: /\.js$/, loader: "eslint-loader", exclude: /node_modules/ }
],
//https://github.com/Flipboard/react-canvas/issues/102
loaders: [
{test: /\.scss$/,loaders: [
"style",
"css?modules&importLoaders=1&localIdentName=[path]___[name]__[local]___[hash:base64:5]",
"autoprefixer-loader",
"sass"]},
{test: /\.jade/, loader: "jade" },
{test: /\.js?$/, exclude: /node_modules/, loader: 'babel',
query: {
presets: ['es2015', 'react']
}
},
{
test: /(\.js|\.jsx)$/,
loader: 'cssx-loader',
exclude: /node_modules/
}
],
resolve: {
extensions: ['', '.js', '.jsx']
}
},
eslint: {
configFile: '.eslintrc'
}
};