-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.showcase.config.js
More file actions
78 lines (69 loc) · 1.83 KB
/
webpack.showcase.config.js
File metadata and controls
78 lines (69 loc) · 1.83 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
'use strict';
const webpack = require('webpack');
const path = require('path');
//const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
entry: {
app: [path.resolve(__dirname, 'examples/src/index.js')]
},
output: {
pathinfo: true,
path: path.resolve(__dirname, 'docs/js/'),
publicPath: 'docs/js/',
filename: 'showcase.bundle.js'
},
externals: {
phaser: {
umd: "phaser",
commonjs2: "phaser",
commonjs: "phaser",
amd: "phaser",
// indicates global variable should be used
root: "Phaser"
},
underscore: {
umd: "underscore",
commonjs2: "underscore",
commonjs: "underscore",
amd: "underscore",
// indicates global variable should be used
root: "_"
},
phasercomps: {
umd: "phaser-ui-comps",
commonjs2: "phaser-ui-comps",
commonjs: "phaser-ui-comps",
amd: "phaser-ui-comps",
// indicates global variable should be used
root: "PhaserComps"
}
},
module: {
rules: [
{
test: [ /\.vert$/, /\.frag$/ ],
use: 'raw-loader'
},
{
test: /\.js$/,
use: ['babel-loader'],
include: path.join(__dirname, 'examples/src/')
}
]
},
plugins: [
new webpack.DefinePlugin({
'CANVAS_RENDERER': JSON.stringify(true),
'WEBGL_RENDERER': JSON.stringify(true),
'EXPERIMENTAL': JSON.stringify(true)
})
],
optimization: {
splitChunks: {
name: 'vendor',
chunks: 'all'
}
},
mode: "production"
//mode: "development"
};