forked from nosovsh/motoparking
-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
53 lines (48 loc) · 1.64 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 webpack = require("webpack");
var path = require("path");
var autoprefixer = require("autoprefixer");
var precss = require("precss");
module.exports = {
devtool: "cheap-module-eval-source-map",
// Entry point for static analyzer:
entry: [
"webpack-dev-server/client?http://localhost:3005",
"webpack/hot/only-dev-server",
"./entry.jsx"
],
output: {
path: path.join(__dirname, "./build/"),
filename: "[name].js",
publicPath: "http://localhost:3005/build/"
},
resolve: {
// Allow to omit extensions when requiring these files
extensions: ["", ".js", ".jsx"],
root: __dirname
},
module: {
loaders: [
// Pass *.jsx files through jsx-loader transform
{test: /\.jsx$/, exclude: "/node_modules/", loaders: ["react-hot", "babel-loader"]},
{test: /\.css$/, loader: "style-loader!css-loader!postcss-loader"},
{test: /\.png$/, loader: "file"},
{test: /\.jpg$/, loader: "file"},
{test: /\.gif/, loader: "file"},
{test: /\.(ttf|eot|svg|woff|ttf)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader"},
// { test: "png|jpg|jpeg|gif|svg", loader: "url-loader?limit=10000",}
{test: /\.scss$/, loader: "style!css!sass"},
{test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
// GA_TRACKING_CODE: undefined,
DEBUG: true,
YANDEX_API_KEY: JSON.stringify("AHMEKVUBAAAAdcQIfQIA6t3GMOs3_4bbwjkyhyBbjTpnP0cAAAAAAAAAAACGT93VehWe6n5wXG-tL7Gv_61nSw==")
})
],
postcss: function() {
return [autoprefixer({ browsers: ["> 5%"] }), precss];
}
};