forked from rafi-tilt/filepizza
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
50 lines (43 loc) · 832 Bytes
/
webpack.config.js
File metadata and controls
50 lines (43 loc) · 832 Bytes
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
const nib = require("nib");
const webpack = require('webpack')
module.exports = {
entry: "./src/client",
target: "web",
output: {
filename: "dist/bundle.js"
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader"
},
{
test: /\.json$/,
loader: "json"
},
{
test: /\.styl$/,
loader: "style-loader!css-loader!stylus-loader"
}
]
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
'GA_ACCESS_TOKEN': JSON.stringify(process.env.GA_ACCESS_TOKEN),
}
})
],
node: {
fs: "empty"
},
stylus: {
use: [nib()]
},
rules: [{
test: /react-google-analytics/,
use: process.env.GA_ACCESS_TOKEN ? 'null-loader' : 'noop-loader'
}]
};