-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
50 lines (49 loc) · 1.36 KB
/
webpack.config.js
File metadata and controls
50 lines (49 loc) · 1.36 KB
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 path = require( 'path' );
const PWD = process.env.PWD;
module.exports = {
entry: ['whatwg-fetch','./src/js/main.js'],
output: {
filename: './build/app.js'
},
sassLoader: {
includePaths: [
'./node_modules/'
]
},
//resolve: {
// root : [
// path.resolve( __dirname, __DIRNAME ) //Order of searching a file-> neo/js/app then neo/ then node_modules/
// ],
// moduleDirectories: [ 'node_modules' ] //define where your modules will be resolved, //files in these directory can be required without a relative path
//},
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'react']
}
},
{
test: /\.scss$/,
exclude: /node_modules/,
loader: 'style-loader!css-loader!sass-loader'
},
{
test: /\.json$/,
loader: 'json-loader'
},
{
test : /\.png/,
loader: 'url-loader?limit=10000&mimetype=image/png'
}
]
},
node: {
fs: 'empty',
net: 'empty',
tls: 'empty'
}
};