forked from GeoTIFF/geotiff.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.shared.js
More file actions
57 lines (56 loc) · 1.21 KB
/
webpack.shared.js
File metadata and controls
57 lines (56 loc) · 1.21 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
const webpack = require('webpack');
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: [
'babel-polyfill',
'./src/index.js'
],
resolve: {
modules: ['node_modules', 'src'],
extensions: ['.js', '.json']
},
module: {
rules: [{
test: /\.less$/,
use: [
"style-loader",
"css-loader",
"less-loader"
]
},
{
test: /\.js$/,
exclude: /node_modules/,
use: "babel-loader",
}
]
},
plugins: [
new CleanWebpackPlugin(['docs']),
new CopyWebpackPlugin([{
from: './assets/images',
to: 'images'
},
{
from: './assets/favicon.png',
to: 'favicon.png'
},
{
from: './404.html',
to: '404.html'
},
{
from: './sitemap.xml',
to: 'sitemap.xml'
}
]),
new FaviconsWebpackPlugin('./assets/favicon.png'),
new HtmlWebpackPlugin({
template: 'index.html',
title: 'GeoTIFF.io',
})
],
}