This repository has been archived by the owner on Feb 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
63 lines (62 loc) · 1.63 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
var path = require('path');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const TypedocWebpackPlugin = require('typedoc-webpack-plugin');
module.exports = {
// Change to your "entry-point".
entry: {
'Bronze': './src/Bronze.ts',
'Bronze.min': './src/Bronze.ts'
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, './dist'),
publicPath: '/dist',
library: "Bronze",
libraryTarget: 'umd',
umdNamedDefine: true
},
devServer: {
overlay: true
},
resolve: {
extensions: ['.ts', '.tsx', '.js', '.json', '.glsl']
},
module: {
rules: [
{
// Include ts, tsx, js, and jsx files.
test: /\.(ts|js|glsl)x?$/,
exclude: /node_modules/,
loader: 'babel-loader',
},
{
test: /\.glsl$/,
loader: 'webpack-glsl'
}
],
// loaders: [
// {
// test: /\.ts|js$/,
// exclude: /(node_modules|bower_components)/,
// loader: 'babel-loader',
// query: {
// cacheDirectory: true,
// presets: ['es2015']
// }
// },
// {
// test: /\.glsl$/,
// loader: 'webpack-glsl'
// }
// ]
},
optimization: {
minimize: true,
minimizer: [new UglifyJsPlugin({
include: /\.min\.js$/
})]
},
plugins: [
new TypedocWebpackPlugin({})
]
};