-
Notifications
You must be signed in to change notification settings - Fork 86
/
webpack.config.gh-pages.js
46 lines (45 loc) · 1.23 KB
/
webpack.config.gh-pages.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
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
entry: './example.ts',
mode: 'production',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.html?$/,
use: 'raw-loader',
exclude: /node_modules/,
},
{
test: /\.(glsl|vs|fs|vert|frag)$/,
exclude: /node_modules/,
use: [
'ts-shader-loader'
]
}
],
},
plugins: [
new CopyPlugin({
patterns: [
{ from: 'index.html', to: 'index.html' },
// build/css so it aligns with the parcel script
{ from: 'node_modules/leaflet/dist/leaflet.css', to: 'build/css/leaflet.css' },
{ from: 'data/**', to: '' },
],
}),
],
resolve: {
extensions: ['.tsx', '.ts', '.js', '.html'],
},
output: {
filename: 'glify-browser.js',
path: path.resolve(__dirname, '.gh-pages'),
libraryTarget: 'umd',
},
};