-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
36 lines (35 loc) · 1.19 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
var path = require('path');
var pkg = require('./package.json')
var DEBUG = process.env.NODE_ENV !== 'production';
var util = require('util');
var entry = {
app: ['./app.js']
};
module.exports = {
context: path.join(__dirname, 'app'),
entry: entry,
debug : DEBUG,
target : 'web',
devtool : DEBUG ? 'inline-source-map' : false,
output: {
path: path.resolve(pkg.config.buildDir),
publicPath: DEBUG ? "/" : "./",
filename: "bundle.js"
},
node: {
fs: 'empty'
},
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader", query:{presets:['es2015']}},
{ test: /\.html$/, exclude: /node_modules/, loader: "file-loader?name=[path][name].[ext]"},
{ test: /\.jpe?g$|\.svg$|\.png$/, exclude: /node_modules/, loader: "file-loader?name=[path][name].[ext]"},
{ test: /\.json$/, exclude: /node_modules/, loader: "json"},
{ test: /\.json$/, include: path.join(__dirname, 'node_modules', 'pixi.js'),loader: 'json'}
],
postLoaders: [{
include: path.resolve(__dirname, 'node_modules/pixi.js'),
loader: 'transform?brfs'
}]
}
};