-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
44 lines (42 loc) · 1.08 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
let path = require('path');
let webpack = require('webpack');
let definePlugin = new webpack.DefinePlugin({
'__DEBUG__': true
});
module.exports = {
entry: {
"s0-engine": [
path.resolve(__dirname, 'src/index')
]
},
devtool: 'source-map',
output: {
pathinfo: true,
path: path.resolve(__dirname, 'dist'),
filename: '[name].js'
},
plugins: [
definePlugin,
new webpack.HotModuleReplacementPlugin()
],
module: {
rules: [
{
test: /\.js$/,
use: {
loader: 'babel-loader'
},
exclude: /node_modules\//
},
{ test: /\.(glsl|frag|vert)$/, loader: 'raw-loader', include: [ path.join(__dirname, 'src') ], exclude: /node_modules/ },
{ test: /\.(glsl|frag|vert)$/, loader: 'glslify-loader', include: [ path.join(__dirname, 'src') ], exclude: /node_modules/ },
{ test: /\.worker\.js$/, loader: "worker!babel?presets[]=es2015", include: [ path.join(__dirname, 'src') ], exclude: /node_modules/ }
]
},
node: {
fs: 'empty',
net: 'empty',
tls: 'empty'
},
watch: true
};