forked from robertleeplummerjr/Leaflet.glify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.dev.js
54 lines (53 loc) · 1.43 KB
/
webpack.config.dev.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
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
entry: './example.ts',
watch: true,
devtool: 'inline-source-map',
devServer: {
contentBase: path.join(__dirname, 'dist'),
compress: true,
port: 9000
},
mode: "development",
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: [
'raw-loader',
'glslify-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, '.dev-server'),
libraryTarget: "umd",
},
};